2017-08-03 21 views
0

opencvをWindows 10にnodejsをインストールしようとしていますが、下にエラーが表示されています。nodejsにopencvをインストール中にエラーが発生しました

 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:258:23) 
     gyp ERR! stack  at emitTwo (events.js:125:13) 
     gyp ERR! stack  at ChildProcess.emit (events.js:213:7) 
     gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
     gyp ERR! System Windows_NT 10.0.15063 
     gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\opencv\\build\\opencv\\v6.0.0\\Release\\node-v57-win32-x64\\opencv.node" "--module_name=opencv" "--module_path=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\opencv\\build\\opencv\\v6.0.0\\Release\\node-v57-win32-x64" 
     gyp ERR! cwd C:\Program Files\nodejs\node_modules\npm\node_modules\opencv 
     gyp ERR! node -v v8.2.1 
     gyp ERR! node-gyp -v v3.6.2 
     gyp ERR! not ok 
     node-pre-gyp ERR! build error 
     node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Program Files\nodejs\node_modules\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v57-win32-x64\opencv.node 
--module_name=opencv --module_path=C:\Program Files\nodejs\node_modules\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v57-win32-x64' (1) 
     node-pre-gyp ERR! stack  at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\opencv\node_modules\node-pre-gyp\lib\util\compile.js:83:29) 
     node-pre-gyp ERR! stack  at emitTwo (events.js:125:13) 
     node-pre-gyp ERR! stack  at ChildProcess.emit (events.js:213:7) 
     node-pre-gyp ERR! stack  at maybeClose (internal/child_process.js:921:16) 
     node-pre-gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
     node-pre-gyp ERR! System Windows_NT 10.0.15063 
     node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\opencv\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" 
     node-pre-gyp ERR! cwd C:\Program Files\nodejs\node_modules\npm\node_modules\opencv 
     node-pre-gyp ERR! node -v v8.2.1 
     node-pre-gyp ERR! node-pre-gyp -v v0.6.36 
     node-pre-gyp ERR! not ok 
     Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Program Files\nodejs\node_modules\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v57-win32-x64\opencv.node 
--module_name=opencv --module_path=C:\Program Files\nodejs\node_modules\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v57-win32-x64' (1) 
     npm ERR! code ELIFECYCLE 
     npm ERR! errno 1 
     npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
     npm ERR! Exit status 1 
     npm ERR! 
     npm ERR! Failed at the [email protected] 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\suresh\AppData\Roaming\npm-cache\_logs\2017-08-03T18_05_40_307Z-debug.log 

     C:\Program Files\nodejs\node_modules\npm> 
+2

正しく質問をフォーマットしてみてください。 –

答えて

0

hereからVisual C++ 2015ビルドツールをダウンロードしてください。このコマンドを実行してインストールした後

npm config -g set msvs_version 2015 
関連する問題