It takes relatively more time to get nodejs compiled and installed on Linux workstations. And, the new node binary installations seem not work out of the box, just if you do a copy of lib, share, bin folder to /usr/local/ . npm gives the error: Cannot find module ‘npmlog’.

So sequence of steps you have to do a right installation are here:

 sudo cp -fr bin/* /usr/local/bin/
 sudo cp -fr include/* /usr/local/include/
 sudo cp -fr lib/* /usr/local/lib/
 sudo cp -fr share/* /usr/local/share/
 sudo rm -f /usr/local/bin/npm
 sudo ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm

To have sudo-able executables, you may as well add these too:

sudo ln -s /usr/local/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/node /usr/lib/node
sudo ln -s /usr/local/bin/npm /usr/bin/npm
Advertisements