1

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! 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

what should i do?

Brad
  • 159,648
  • 54
  • 349
  • 530
Phillip Ochola
  • 154
  • 3
  • 9
  • 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 Sep 19 '14 at 00:27
  • 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 Sep 21 '14 at 06:15
  • 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-node – Phillip Ochola Sep 21 '14 at 06:25
  • I have the same problem, also with node-opencv on Windows. – Alexander Link Oct 25 '14 at 11:19
  • 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 https://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: https://www.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 Oct 25 '14 at 11:25
  • Yeah.. I solved the problem on some modules by just getting the actual master files on git and then trying to build them directly. But It doesnt work all the time. not on opencv.. But from the git thread on common issues the creator of the module says he developed a fix for that error.. https://github.com/peterbraden/node-opencv/issues/17 check it out and tell me if it worked – Phillip Ochola Nov 07 '14 at 07:35
  • @PhillipOchola you can also try the procedure at http://stackoverflow.com/questions/27688804/how-to-debug-any-node-js-child-process-error-spawn-enoent – laconbass Dec 29 '14 at 13:33
  • Hey guys... @Alexander Link.. hey soo.. node-gype will not run on command because node does not include the run files in the system environment.. so you have to npm install -g node-gyp .. to install it.. and then go to the location.. (at least in my case) "C:\Users\mc\node_modules\.bin" .. the node-gyp.exe/node-gyp.sh file should be there.. add this path to the system env path... after this you should be able to run node-gyp.. though I still get the same error when installing opencv using npm.. but atleast I can run node-gyp rebuild on the git clone.. – Phillip Ochola Jan 10 '15 at 17:23

0 Answers0