Node.js is platform of Javascript for server-side programming, developers can quickly build network applications with the help of Node.js
To install recent version of Node.js you should install it from PPA (personal package archive) of NodeSource. From this repository you will get most recent version of Node.js
First you have to curl the PPA repository of Node.js to get access to its contents:
curl -sL https://deb.nodesource.com/setup | sudo bash
Now you can install Node.js with the help of following command. This will install nodejs along with npm, so you do not need to install npm separately. While you are installing nodejs from this repository.
sudo apt-get install nodejs
Some packages need to build from source. So to work with them you need to install build-essentials. With the help of following command.
sudo apt-get install build-essential
Now now you can check the version of nodejs and npm with the help of following command.
node -v
npm -v
Now this is done.....................................
To install recent version of Node.js you should install it from PPA (personal package archive) of NodeSource. From this repository you will get most recent version of Node.js
First you have to curl the PPA repository of Node.js to get access to its contents:
curl -sL https://deb.nodesource.com/setup | sudo bash
-
Now you can install Node.js with the help of following command. This will install nodejs along with npm, so you do not need to install npm separately. While you are installing nodejs from this repository.
sudo apt-get install nodejs
Some packages need to build from source. So to work with them you need to install build-essentials. With the help of following command.
sudo apt-get install build-essential
Now now you can check the version of nodejs and npm with the help of following command.
node -v
npm -v
Now this is done.....................................