How to Install Node.js and NPM

Welcome to a walk-through on installing Node.js and NPM

Monish Narendra
4 min readApr 15, 2021

What is Node.js and NPM?

Node.js is an open-source and cross-platform JavaScript-based environment. Which allows us to create web-servers and networked applications. In Addition to that we can also use it to perform helpful tasks on our computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.

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.

For Windows

Node.js website using this link → https://nodejs.org/en/download/

  • Click on Windows Installer.
Node.js website — Windows Installer Marked in Red Box
  • 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.

Mark the checkbox and Click Next

On the next screen, leave the default location, unless you have a specific need to install it somewhere else → Click Next Button.

Keep Defaults and Click Next

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.

Keep Defaults and Click Next

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:

Command Prompt — Node and NPM Versions

If you are able to the version number of both node and npm them Congratulations !!!.. Yeeee.. You have successfully installed Node.js and NPM

For Ubuntu

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

node -v
npm -v

Conclusion

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 !!!

--

--

No responses yet