sudo apt-
get
install nodejs
sudo apt-
get
install npm
sudo apt-
get
install nodejs-legacy
sudo npm install -g n
sudo n latest OR sudo n stable
*************
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install nodejs
sudo apt-get install build-essential