3

I'm 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?

Thanks!

SandyWeb
  • 91
  • 1
  • 8
  • ``node-waf`` is part of the development packages for Node.js. You're using RHEL5 (or a variant of it), so I don't know the exact syntax, but look for a package named something like ``nodejs-dev`` and install it. –  Mar 19 '12 at 21:54
  • If it's already installed, why isn't it on your $PATH ? That's what's stopping it from running. –  Mar 20 '12 at 22:15
  • sorry, I did mistake. I mean nodejs-dev already installed. – SandyWeb Mar 20 '12 at 22:38
  • A quick Google search indicates that [node-waf is in a different package](http://nodejs.tchol.org/stable/el5/i386/repoview/) for RHEL5, called ``nodejs-waf``. We shouldn't have to hold your hand every step of the way. –  Mar 20 '12 at 22:44
  • Thank you very much for the help! I installed nodejs-waf.i386, now all works. – SandyWeb Mar 20 '12 at 22:55

4 Answers4

4

It is related to issue 773 over at socket.io git https://github.com/LearnBoost/socket.io/issues/773

"node-waf is a tool shipped with Node.js to help build C++ files into a node.js compatible library or tool. It is only available if you installed node.js from source" http://apphacker.wordpress.com/2011/09/12/node-waf-command-not-found/

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

eephillip
  • 1,183
  • 15
  • 25
1

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

Talos
  • 147
  • 2
  • 6
1

Make sure node-waf is not in your path.

$ which node-waf

Mine is 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.

martyn
  • 131
  • 1
  • 3
0

If your still need this old version ( like 0.9.0 ) of socket.io, consider installing the 0.9.2 version.

 npm install socket.io@0.9.2