1
votes

I have a problem installing a number of modules with npm and node-gyp. In both cases the problem seems to rely on node-gyp build command. This is the error i always get:

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! [email protected] preinstall: `node-gyp clean rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

what should i do?

OpenCV is a tough one to get working under Windows.... but you say you have this problem on a number of modules? Can you figure out which modules are giving you trouble? In any case, I think the OpenCV module is supposed to work under Windows but I could never get it working. Make sure you have all of its dependencies first.Brad
Yeah actually the ones that have dependencies are the ones that didnt work.. .. well atleast as far as I have seen.. ffmpeg too has issues.. pngjs has issues. . the same error actually..Phillip Ochola
So I installed all dependencies for opencv-node and I have fixed issues I had with python (changed from 3.2 to 2.7) all the dependencies underscore, keypress and coffeescript installed but not the opencv-nodePhillip Ochola
I have the same problem, also with node-opencv on Windows.Alexander Link
I have the same problem, also with node-opencv on Windows. I think the reason is that node-gyp in general does not work. Try to fetch the github.com/rvagg/node-addon-examples and run "node-gyp configure" in the 1_hello_world/node_0.10 folder (where the binding.gyp file is located). This also fails on my computer. I think as long as this does not work opencv will also not work... Here your find more about node-gyp: npmjs.org/package/node-gyp Hints about how to get node-gyp running on Windows 7 are welcome. I installed VS 2012 Express. VS 1010 Express also did not help.Alexander Link