前提・実現したいこと
それは node-opus
をインストールしようとした時です。
コマンドラインが一気に埋め尽くされていくではありませんか!
何をすれば(どうすれば)問題なくインストールすることが出来るか、
お教えください。
発生している問題・エラーメッセージ
> ref@1.3.5 install C:\Users\裕斗\Projects\bot\Node.js\node_modules\ref > node-gyp rebuild C:\Users\裕斗\Projects\bot\Node.js\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Traceback (most recent call last): File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module> sys.exit(gyp.script_main()) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main return main(sys.argv[1:]) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main return gyp_main(args) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main options.duplicate_basename_check) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load generator.CalculateVariables(default_variables, params) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables generator_flags.get('msvs_version', 'auto')) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) KeyError: '=' gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:203:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\裕斗\Projects\bot\Node.js\node_modules\ref gyp ERR! node -v v12.6.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok > node-opus@0.3.2 install C:\Users\裕斗\Projects\bot\Node.js\node_modules\node-opus > node-gyp rebuild C:\Users\裕斗\Projects\bot\Node.js\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Traceback (most recent call last): File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module> sys.exit(gyp.script_main()) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main return main(sys.argv[1:]) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main return gyp_main(args) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main options.duplicate_basename_check) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load generator.CalculateVariables(default_variables, params) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables generator_flags.get('msvs_version', 'auto')) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) KeyError: '=' gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:203:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\裕斗\Projects\bot\Node.js\node_modules\node-opus gyp ERR! node -v v12.6.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN discord.js@11.5.1 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself. npm WARN discord-bot@2.4.1-b No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 (node_modules\ref): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ref@1.3.5 install: `node-gyp rebuild` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-opus@0.3.2 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-opus@0.3.2 install 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! C:\Users\裕斗\AppData\Roaming\npm-cache\_logs\2019-07-21T15_57_50_956Z-debug.log
試したこと
・C:\Users\裕斗
にある .node-gyp
を消した
・npm
を最新版にした
・node-gyp
も最新のものに
・node-gyp rebuild
をした → エラー
gyp info it worked if it ends with ok gyp info using node-gyp@5.0.3 gyp info using node@12.6.0 | win32 | x64 gyp info find Python using Python version 2.7.16 found at "C:\Python27\python.exe" gyp info find VS using VS2019 (16.1.29102.190) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Python27\python.exe gyp info spawn args [ gyp info spawn args 'C:\Users\裕斗\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-I', gyp info spawn args 'C:\Users\裕斗\Projects\bot\Node.js\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\裕斗\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\裕斗\AppData\Local\node-gyp\Cache\12.6.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=C:\Users\裕斗\AppData\Local\node-gyp\Cache\12.6.0', gyp info spawn args '-Dnode_gyp_dir=C:\Users\裕斗\AppData\Roaming\npm\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\Users\裕斗\AppData\Local\node-gyp\Cache\12.6.0\<(target_arch)\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\裕斗\Projects\bot\Node.js', 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 'C:\Users\裕斗\Projects\bot\Node.js\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp: binding.gyp not found (cwd: C:\Users\裕斗\Projects\bot\Node.js) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\裕斗\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:344:16) gyp ERR! stack at ChildProcess.emit (events.js:203:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\裕斗\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\裕斗\Projects\bot\Node.js gyp ERR! node -v v12.6.0 gyp ERR! node-gyp -v v5.0.3 gyp ERR! not ok
・Visual Studio Build Tools
も 2019年版にした (msvs_version
も一緒に)
・パスの空白をなくした
・node-gyp
の GitHub の Issue を見てパスに日本語が入っていても大丈夫な設定にした
・PC を変えた
補足情報(FW/ツールのバージョンなど)
OS: Windows_NT 10.0.18362
VS: VS2019 (16.1.29102.190)
Node: node v12.6.0
Node-gyp: node-gyp@5.0.3
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。