3

I get this error message when I run "npm install socket.io." Can anyone help with this? Is the main problem with the "[email protected] script," whatever that is?

Also, what does the "node-gyp rebuild 2> builderror.log" mean? I've head that Python may be related to this problem, but I don't really know how.

Thanks a lot for your help!

$ npm install --save socket.io
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
|


> [email protected] install         
c:\codeprojects\famedu\node_modules\socket.io\node_modules\en
gine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

/
> [email protected] install     
c:\codeprojects\famedu\node_modules\socket.io\node_modules\s
ocket.io-client\node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


npm ERR! [email protected] install: `(node-gyp rebuild 2> builderror.log) || (exit    
0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR!     npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program     
Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "socket.io"
npm ERR! cwd c:\codeprojects\famedu
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

1 Answer 1

1

You need to have both python 2.x and Visual Studio (Express Edition or higher) installed in order to build native dependencies on Windows.

ws is short for web socket; it's a socket client -- see https://www.npmjs.com/package/ws -- and ws needs to be compiled as a binary add-on.

There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4.28. Can you try updating your npm installation?

To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

1
  • Upgrading npm (following the official guide) worked for me. Thanks Sam.
    – Iansen
    Feb 26, 2015 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.