What is Node.js and NPM?
It’s truly a popular tool for almost any kind of project!
NPM (Node Package Manager) is basically a “package manager” that allows easy and quick way for installing Node packages.
Side Note : NPM is automatically installed when Node.js is installed
This article will cover installation across Windows, MAC and Ubuntu.
- Navigate to Node.js Site.
Node.js website using this link → https://nodejs.org/en/download/
- Click on Windows Installer.
- Once the download is completed. Run the installer (.msi File).
- You will be welcomed to the Node.js Setup Wizard → Click Next Button.
On the next screen, review the license agreement → Mark the checkbox and Click Next Button.
On the next screen, leave the default location, unless you have a specific need to install it somewhere else → Click Next Button.
On the next screen, the installer will prompt to select components to include or remove from the installation, again unless you have a specific need, accept the defaults by → Click Next Button.
On the next screen, leave the default option by → Click Next Button.
Finally, click the Install button to run the installer. When it finishes, click Finish.
Once the installation done, we get node and npm binaries added to systems environment path. That means, now you can use node and npm command.
Lets check the version of Node installed by using the following commands in our terminal:
If you are able to the version number of both node and npm them Congratulations !!!.. Yeeee.. You have successfully installed Node.js and NPM
Make sure you have curl installed in your system else the following code to install curl.
sudo apt install curl
Navigate to Node.js Site.
Node.js website using this link → https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Click on “Node.js binary distributions” Link as shown in the below image.
Scroll Down to the section that says “Installation instructions” and find the latest version you need to install.
For me at the time of writing this article it is Node.js v15.x
Copy the curl command in the website and paste in your terminal and click enter.
curl -fsSL https://deb.nodesource.com/setup_15.x | sudo -E bash -
Once the first command execution is done. Copy the sudo command in the website and paste in your terminal and click enter.
sudo apt-get install -y nodejs
Use the command to check the version of node installed by checking the node.js version
If you are able to see the version number of both Node.js and NPM them Congratulations !!!.. Yeeee !!.
I do hope this guide has shown you how easy it is to install Node.js and NPM.
Comments and questions welcome below — I hope that you found this useful!
Stay Happy !!!
Stay Safe !!!