# Note the new setup script name for Node.js
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
# Then install with:
sudo apt-get install -y nodejs
sudo apt-get install nodejs-legacy
sudo apt-get install npm
1) Clear NPM's cache:
sudo npm cache clean -f
2) Install a little helper called 'n'
sudo npm install -g n
3) Install latest stable NodeJS version
sudo n stable
List all components
npm list --depth=0
EOF