The Wayback Machine - https://web.archive.org/web/20241130190251/https://www.geeksforgeeks.org/install-node-js-on-windows/
Open In App

How to Install Node.js on Windows?

Last Updated : 20 Nov, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Node.js can be installed in multiple ways on a computer. The approach used by you depends on the existing Node.js development environment in the system. There are different package installers for different environments.

Steps to Install Node on Windows

You can install Node.js by grabbing a copy of the source code and compiling the application. Another way of installing Node.js is by cloning the Node.js GIT repository in all three environments and then installing it on the system.

You have to follow the following steps to install the Node.js on your Windows:

Step 1: Download NodeJS

Downloading the Node.js ‘.msi’ installer the first step to install Node js on Windows is to download the installer. Visit the official Node.js website i.e) https://nodejs.org/en/download/

Download-Node

Download NodeJS

You can run the above commands to install the nodejs. You can also download Node js using the Prebuilt installer.

Installing Node.js is the first step towards building scalable web applications. For a complete guide to setting up Node.js and using it in full-stack development, the Full Stack Development with React & Node JS course covers everything from installation to creating your first full-stack app.

Step 2: Go to Prebuilt Installer and Select the Versions

You can select the required version or download the Long Time Support version. Click on the Download button to download the node version.

Nodejs-installer-MSI

Congratulations, you’ve now successfully complete the nodejs download.

Once You download the .msi installer follow the next step.

Step 3: Run the Node.js Installer

Once the Nodejs download is complete, you need to install the node.js installer on your PC. You need to follow the following steps for the Node.js to be installed:

3.1 Double-click on the .msi installer to open the Node.js Setup wizard and select “Next”

Run-the-Nodejs-Installer

Run the Nodejs Installer

3.2 After clicking “Next”, the End-User License Agreement (EULA) will open. Now, check “I accept the terms in the License Agreement” and select “Next”

nodejs-setup

Nodejs Setup

3.3 Choose “Destination Folder” where you want to install Node.js & select “Next”.

nodejs-setup02

Else, go with this for “Custom Setup”.

custom-setup

Step 4: Finish Setup and Install Node.js

The installer may prompt you to “install tools for native modules”. Select “Install” to complete the process.

finish-setup

Finish the setup

and wait for “Finish” to complete the setup.

Installation

Nodejs Installation

4.1 Verify that Node.js was properly installed or not

To check whether node.js was completely installed on your system or not, you can run the following command in your command prompt or Windows Powershell and test it:

C:\Users\Admin> node -v

If node.js was completely installed on your system, the command prompt will print the version of the Node JS installed.

4.2 Update the Local npm version

You can run the following command, to quickly update the npm

npm install npm --global // Updates the ‘CLI’ client

Other Methods to Install Node.js in Windows

1. Node Version Manager (NVM)

Node Version Manager or nvm-windows allows users to manage different versions of node.js Here’s how you can do it:

  • Visit the GitHub official site.
  • Download the latest zip or exe file of nvm-windows
  • Run the installer by following the actions

You can also check for the default version by entering the following command in CMD:

nvm use 16.20.0

You may also verify the installation by entering the following command:

node -v
npm -v

2. Windows Subsystem (WSL)

You may also use WSL or Windows Subsystem if you have,

if not check out this article to Install Windows Subsystem for Linux

  • Open the Windows Subsystem terminal and type the following command to update the package list:
sudo apt update
  • Now, start with the Nodejs Installation process with the following command:
sudo apt install nodejs npm

Once the installation is complete, verify the installation by entering the following command:

node -v
npm -v

How to Install Node.js on Windows – FAQs

How to Install Node.Js on Windows?

The best method to install NodeJs on Windows is:

  • Download Node js Installer
  • Now, install Nodejs and npm
  • At last, check the version of Nodejs and npm

Does Node.js come with npm?

Yes, npm come with Node js. You may verify the installation with the help of the following command:

C:\> npm -v
2.11.3

How to install Node.js in local?

Below are three simple steps to install Node js in local:

  • Firstly, create a server and start a new project following the server file
  • Start Running the server by node server.js
  • Now press Ctrl+C to stop the server


Previous Article
Next Article

Similar Reads

three90RightbarBannerImg