During npm install socket.io I get error 127, node-waf command not found. How to solve it?

I am trying to install socket.io on centos 5 with node.js package manager. During installation, I got an error:

"make: node -waf: command not found
and
" This is most likely a problem with the ws package

# npm install socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/socket.io-client/0.9.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.2
npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/zeparser/0.0.5

> ws@0.4.8 preinstall /root/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> make

**node-waf configure build
make: node-waf: Command not found
make: *** [all] Error 127**

npm ERR! ws@0.4.8 preinstall: `make`
npm ERR! `sh "-c" "make"` failed with 2
npm ERR! 
npm ERR! Failed at the ws@0.4.8 preinstall 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!     make
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! 
npm ERR! System Linux 2.6.18-194.17.4.el5
npm ERR! command "node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /root
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.10
npm ERR! code ELIFECYCLE
npm ERR! message ws@0.4.8 preinstall: `make`
npm ERR! message `sh "-c" "make"` failed with 2
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm not ok

      

What is "node-waf" and how can I solve this problem?

Thank!

+3


source to share


4 answers


This is related to issue 773 on socket.io git https://github.com/LearnBoost/socket.io/issues/773

"node-waf is a tool that comes with Node.js for creating C ++ files in a Node.js library or tool. It is only available if you have installed Node.js from the source" http: //apphacker.wordpress .com / 2011/09/12 / node-waf-command-not-found /



so run this to get the missing dependencies for me sudo apt-get install nodejs-dev

+4


source


Make sure node-waf is not in your path.

$ which is node-waf

Mine is located in / usr / local / bin / node-waf, so if that doesn't work try



$ ls / usr / local / bin / node-waf

If you still can't find it, it's in the tools directory inside node. You may need to reinstall.

+1


source


It's also worth noting that node-waf has been removed in any version of node since 0.9.1:

https://github.com/joyent/node/blob/master/ChangeLog#L630

+1


source


If you still need this old version (eg 0.9.0) of socket.io file, consider installing version 0.9.2.

 npm install socket.io@0.9.2
      

Run codeHide result


0


source







All Articles