Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spawn ENOENT Error with npm install

everytime I try to run npm install I get an ENOENT error with the following log:

2563 error Error: spawn ENOENT
2563 error     at errnoException (child_process.js:980:11)
2563 error     at Process.ChildProcess._handle.onexit (child_process.js:771:34)
2564 error If you need help, you may report this log at:
2564 error     <http://github.com/isaacs/npm/issues>
2564 error or email it to:
2564 error     <[email protected]>
2565 error System Windows_NT 6.1.7601
2566 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program              Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phantomjs"
2567 error cwd C:\Users\Tyler
2568 error node -v v0.10.12
2569 error npm -v 1.2.32
2570 error syscall spawn
2571 error code ENOENT
2572 error errno ENOENT
2573 verbose exit [ 1, true ]

I've pasted the full log found in npm-debug.log here: http://pastebin.com/8PB8JRzW

I'm running Windows 7 64-bit, have set my PYTHON environment variable, have MSVS2012, installed node-gyp, and am running the command line as an administrator. Any thoughts on how to get npm install to work? Thanks!

like image 762
Tyler Sanderson Avatar asked Nov 02 '22 18:11

Tyler Sanderson


1 Answers

As per https://github.com/TooTallNate/node-gyp/issues/277#issuecomment-25943524:

  1. Make Sure Your Python and node are both x86 (32Bit) or both x86-x64 (64Bit), a mix will throw this error

  2. Set the environment variable PYTHON to your python.exe, in my case I ran "set PYTHON=E:\Python27\python.exe" before running npm

like image 168
Troggy Avatar answered Nov 15 '22 13:11

Troggy