Install and SetUp Node.js and NPM on Windows

  • by

To start developing application using Node.js, you will require Node.js environment installed on your machine and an IDE to start coding the applications. We will install Node.js by downloading its setup file from its official website. And we will use Visual Studio code to create our first app in Node.js.

What is NPM?

NPM – Node package manager.

  • It is world’s largest software registry.
  • It contains more than 800,000 code packages.
  • Open-sourced developers use npm to share their code.
  • It is free and it gets installed during Node.js installation.

Download and Install Node.js & NPM:

Downloading Node.js msi installation file from nodejs.org . Click on Windows installer, installer will be getting downloaded on your system.

node-js-windows-install-setup-installer

Once it is downloaded, double-click on it and follow the steps for installation:

Step 1: Double-click on the step up msi file. Installation window will come up. Click Next.

nodejs-windows-installation-step-1

Step 2: Accept the Terms and Conditions and click Next
nodejs-windows-installation-step-2

Step 3: Select the File location:

nodejs-windows-installation-step-3

Step 4: Select the features and also “Add to Path”

nodejs-windows-installation-step-4

Step 5: On Tools for Native Modules, you can select the auto option or opt-out. The installation of the necessary script and Chocolatey will continue once the Node.js installation is completed.

nodejs-windows-installation-step-5

Step 6: On Ready to install window, click Install. You will need Administrator permissions for this.

nodejs-windows-installation-step-6

This steps will install Node.js on your Windows machine.

Checking Installation of Node.js and NPM:

Open Windows PowerShell and check Node.js installed version. Type command node -v to check and confirm Node.js installation is proper or not.

This command will show the installed version of Node.js on your machine. Also check the npm version by using command npm -v.

Installing and Setting up Visual Studio Code:

Now download Visual Studio Code and install it on your machine. You can download it from their official website code.visualstudio.com. The installation is pretty simple. Once installed open it.

Once you have opened Visual studio code, open a new terminal windows by pressing:

Control + Shift + ` keys together.

Enter the same command used in powershell to check Node.js and NPM version.

install setup nodejs windows-001

Your Node.js environment is now successfully installed and properly configured.

In the next part, we will create our first Node.js app.



2