2017-05-15 13 views
-2

今日、私はNode.jsで不協和音ボットを試してみることにしました。私はそれをインストールするために行ったとき、私はエラーを取得し始めた。私は解決策を見つけるためにインターネットを検索し始めました。何もインストールされていないことがわかったとき。たとえば、Node.jsに何もインストールされていないのはなぜですか?

C:\Users\aidan\Documents\discord bot>npm install --global --production windows-build-tools 
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
\ 
[email protected] postinstall C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools 
node ./lib/index.js 
Downloading BuildTools_Full.exe 
[>           ] 0.0% (0 B/s) 
Downloading python-2.7.11.msi 
[>           ] 0.0% (0 B/s) 
Downloaded python-2.7.11.msi. Saved to C:\Users\aidan\.windows-build-tools\python-2.7.11.msi. 
Starting installation... 
Launched installers, now waiting for them to finish. 
This will likely take some time - please be patient! 
Waiting for installers... -C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:92 
     if (data.includes('Variable: IsInstalled = 1') || data.includes('Variabl 
      ^
TypeError: undefined is not a function 
    at Tailer.handleData (C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:92:16) 
    at null.<anonymous> (C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:72:16) 
    at wrapper [as _onTimeout] (timers.js:265:14) 
    at Timer.listOnTimeout (timers.js:110:15) 
npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "--production" "windows-build-tools" 
npm ERR! node v0.12.2 
npm ERR! npm v2.7.4 
npm ERR! code ELIFECYCL 
npm ERR! [email protected] postinstall: `node ./lib/index.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node ./lib/index.js'. 
npm ERR! This is most likely a problem with the windows-build-tools package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node ./lib/index.js 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls windows-build-tools 
npm ERR! There is likely additional logging output above. 
npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\aidan\Documents\discord bot\npm-debug.log 
C:\Users\aidan\Documents\discord bot> 

は、ビルドツールをインストールしようとしたときのものでした。私は64ビットマシンでWindows 10 Creators Updateを使用しています。 ああ、ええ、私はdiscord.jsインストールしようとしたとき:あなたの助けを

C:\Users\aidan\Documents\discord bot>npm install discord.js 
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
npm WARN peerDependencies The peer dependency [email protected]^3.0.0 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]/erlpack included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]^0.2.5 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]^0.0.3 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]^2.0.1 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]^0.5.1 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN peerDependencies The peer dependency [email protected]^0.14.1 included from discord.js will no 
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"}) 
| 
> [email protected] install C:\Users\aidan\Documents\discord bot\node_modules\bufferutil 
> prebuild-install || node-gyp rebuild 

prebuild-install info begin Prebuild-install version 2.1.2 
prebuild-install info looking for local prebuild @ prebuilds\bufferutil-v3.0.0-node-v14-win32-ia32.tar.gz 
prebuild-install WARN install EPERM, access 'C:\Users\aidan\AppData\Roaming\npm-cache' 

C:\Users\aidan\Documents\discord bot\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (rebuild) 
Traceback (most recent call last): 
    File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module> 
    sys.exit(gyp.script_main()) 
    File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 534, in script_main 
    return main(sys.argv[1:]) 
    File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 527, in main 
    return gyp_main(args) 
    File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 503, in gyp_main 
    options.circular_check) 
    File "C:\Program Files (x86)\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 (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1867, in CalculateVariables 
    generator_flags.get('msvs_version', 'auto')) 
    File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 402, in SelectVisualStudioVersion 
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) 
KeyError: '2015' 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16) 
gyp ERR! stack  at ChildProcess.emit (events.js:110:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:1074:12) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\aidan\Documents\discord bot\node_modules\bufferutil 
gyp ERR! node -v v0.12.2 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 

> [email protected] install C:\Users\aidan\Documents\discord bot\node_modules\uws 
> node-gyp rebuild > build_log.txt 2>&1 || exit 0 

感謝を! -Aidan

+0

これは、より良い「ウィンドウ・ビルド・ツール」と「不和のためにページ上で聞かれる質問のように聞こえます"最初のエラーメッセージは、何をすべきかを正確に示しています。 –

答えて

-2

私はWindowsを使用するが、ツリーハウスからこのブログを見つけていません。

http://blog.teamtreehouse.com/install-node-js-npm-windows

*あなたはノード1日、NPMの第二、そしてあなたが望むその後、すべてのパッケージをインストールしていることを確認してください

関連する問題