[NodeJs] Install Node.js in Ubuntu

Found a very useful article who talks about how to install node.js in ubuntu:
Including the methods wtih PPA and NVM.
Here is the link : install nodejs

Advertisements

[NodeJS] upgrade NodeJS with npm

Normally, it is a little boring to generate versions. Today I want to install sails.js, when I do “sudo npm -g install sails”, it displays several WARN in red, don’t be afraid, there are some command to upgrade your node with npm to the last version or the version that you want.

sudo npm cache clean -f   # Clear your npm cache
sudo npm install -g n     # Install "n" which is node binary module
sudo n stable

you could specify a desired version:

sudo n 0.8.21