我在使用npm和node-gyp安装许多模块时遇到问题。在这两种情况下,问题似乎都依赖于node-gyp构建命令。这是我总是得到的错误:
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:1001:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:792:
34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "E:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "clean" "rebuild"
gyp ERR! cwd C:\Users\mc\AppData\Roaming\npm\node_modules\opencv
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! opencv@0.6.0 preinstall: `node-gyp clean rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv@0.6.0 preinstall script.
npm ERR! This is most likely a problem with the opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp clean rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls opencv
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "E:\\Program Files\\nodejs\\\\node.exe" "E:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "opencv"
npm ERR! cwd E:\Node workspace\webSocket
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
我该怎么办?