質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Express

ExpressはNode.jsのWebアプリケーションフレームワークです。 マルチページを構築するための機能セットおよびハイブリッドのWebアプリケーションを提供します。

Q&A

解決済

1回答

1293閲覧

npm install expres-session エラー

hashiz

総合スコア8

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Express

ExpressはNode.jsのWebアプリケーションフレームワークです。 マルチページを構築するための機能セットおよびハイブリッドのWebアプリケーションを提供します。

0グッド

0クリップ

投稿2020/12/14 13:35

npm install expres-sessionをインストールした際に、下記の問題に直面し色々な記事やサイトを探しても分からず。
原因がわかる方がいましたら、教えていただきたいです。

エラーメッセージ

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-67_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-67_binding.node": HTTP error 404 Not Found Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234 or configure npm proxy via npm config set proxy http://example.com:8080 > node-sass@4.8.3 postinstall /Users/rikuou-008/Downloads/weblog/node_modules/node-sass > node scripts/build.js Building: /usr/local/bin/node /Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ '/usr/local/bin/node', gyp verb cli '/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/bin/node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' ] gyp info using node-gyp@3.6.2 gyp info using node@11.15.0 | darwin | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb `which` succeeded python2 /usr/bin/python2 gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.16\n" gyp verb get node dir no --target version specified, falling back to host node version: 11.15.0 gyp verb command install [ '11.15.0' ] gyp verb install input version string "11.15.0" gyp verb install installing version: 11.15.0 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 11.15.0 gyp verb build dir attempting to create "build" dir: /Users/rikuou-008/Downloads/weblog/node_modules/node-sass/build gyp verb build dir "build" dir needed to be created? /Users/rikuou-008/Downloads/weblog/node_modules/node-sass/build gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /Users/rikuou-008/Downloads/weblog/node_modules/node-sass/build/config.gypi gyp verb config.gypi checking for gypi file: /Users/rikuou-008/Downloads/weblog/node_modules/node-sass/config.gypi gyp verb common.gypi checking for gypi file: /Users/rikuou-008/Downloads/weblog/node_modules/node-sass/common.gypi gyp verb gyp gyp format was not specified; forcing "make" gyp info spawn /usr/bin/python2 gyp info spawn args [ '/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/Users/rikuou-008/Downloads/weblog/node_modules/node-sass/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/rikuou-008/.node-gyp/11.15.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/rikuou-008/.node-gyp/11.15.0', gyp info spawn args '-Dnode_gyp_dir=/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/rikuou-008/.node-gyp/11.15.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/rikuou-008/Downloads/weblog/node_modules/node-sass', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. Traceback (most recent call last): File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module> sys.exit(gyp.script_main()) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main return main(sys.argv[1:]) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main return gyp_main(args) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput part_of_all=qualified_target in needed_targets) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write self.Pchify)) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources cflags = self.xcode_settings.GetCflags(configname) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags archs = self.GetActiveArchs(self.configname) File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs xcode_archs_default = GetXcodeArchsDefault() File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault xcode_version, _ = XcodeVersion() File "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion version = re.match(r'(\d.\d.?\d*)', version).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups' gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/lib/configure.js:336:16) gyp ERR! stack at ChildProcess.emit (events.js:193:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12) gyp ERR! System Darwin 20.1.0 gyp ERR! command "/usr/local/bin/node" "/Users/rikuou-008/Downloads/weblog/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/rikuou-008/Downloads/weblog/node_modules/node-sass gyp ERR! node -v v11.15.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Build failed with error code: 1 npm WARN weblog@1.0.0 No description npm WARN weblog@1.0.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.8.3 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.8.3 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/rikuou-008/.npm/_logs/2020-12-14T13_28_18_835Z-debug.log

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-67_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/darwin-x64-67_binding.node":

たしかにそのURLは存在しないので、Cannot downloadエラーが出るのは当然です。
Node.js全体をアップデートしてみてはいかがでしょう。

try setting a proxy via HTTP_PROXY, e.g.

Proxyの設定が必要の可能性もあります。確認しましょう。

xcode-select: note: no developer tools were found

XCodeのコマンドラインツールズが必要かもしれません。インストールしましたか?

あなたのエラーメッセージだけでもこれくらいの原因は考えられます。
エラーメッセージを読まずに丸投げするのはやめましょう。

投稿2020/12/14 14:00

technocore

総合スコア7225

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hashiz

2020/12/15 01:52 編集

回答者さんの返答に遅れて申し訳ございません。 詳しく述べますと、エラーメッセージに関しては丸投げではなく自分なりに答えを見つけて実行したのですが自分がこのような長文のエラーメッセージは初めて直面し一体どの箇所を適切に処理するのかをエンジニアの方に質問しました。自分でしたら、おそらく1〜2時間いやそれ以上に時間を費やすと思います。しかし、回答者さんは30分以内でエラー文を見つけてそのように対処するのだと大変勉強になりました。恐縮ながらの質問ですが、エラーと出ている箇所を読んでその他は読む必要はないという解釈良いのですか? もし返答をいただけるのあれば幸いです。 返答に関してはnode.jsのバージョンをアップデートしましたら、正常にインストールが出来ました。本当にありがとうございます。 未熟ではございますが、これからもプログラミング学習を続けたいです!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問