2016-08-22 25 views
1

GitBashを使用してWindows 10にnpmをインストールすると、node-gypで次のエラーが表示されます。私は再びnode-gypを再インストールしようとしましたが、助けにはなりません。誰もこの問題を解決する方法を知っていますか?Windows 10のnpmインストール時のnode-gypのエラー

$ npm install 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No README data 

> [email protected] install C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs 
> node-gyp rebuild 


C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node "" rebuild) 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. 
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj] 


gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.10586 
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\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs 
gyp ERR! node -v v4.4.3 
gyp ERR! node-gyp -v v3.3.1 
gyp ERR! not ok 
npm ERR! Windows_NT 10.0.10586 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v4.4.3 
npm ERR! npm v2.15.1 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the libxmljs package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs libxmljs 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls libxmljs 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\Jason\Desktop\Projects\brainiac\npm-debug.log 
+0

私はそれがあなたのビジュアルスタジオ' cl.exe'をコンパイルするのを見つけることができないと思います。あなたがそうでないなら、 'windows-build-tools 'を使って強く*提案する必要があります。インストール指示はnode-gypの[readme](https://github.com/nodejs/node-gyp)にあります。これにより、Windowsにネイティブモジュールを構築するために必要なすべてのツールが自動的にインストールされます。 – dvlsg

+0

また、[ここ](https://github.com/nodejs/node-gyp/issues/802#issuecomment-232865395)(私のWindows 10マシンには、いずれにせよ)。 – dvlsg

+0

最新のnpmバージョンとwindows-build-toolsをインストールしようとしましたが、それでもエラーは修正されませんでした – Jason

答えて

0

あなたは、Visual Studio 2015 /他の完全なパッケージをインストールして、このようなエラーが出るている場合は、それからNPMのインストールを実行するために役立つかもしれない「VS2015 x64のネイティブツールのコマンドプロンプト」 または最初の「C呼び出し:\プログラムファイル(x86の)\ Microsoft Visual Studio 14.0 \ VC \ vcvarsall.bat "

関連する問題