Table of contents
1.
Introduction
2.
Prerequisites
3.
How to install Node.js on Windows
4.
Verifying Node.js Installation
5.
Updating Node.js on Windows
6.
Uninstall Node.js on Windows
7.
Frequently Asked Questions
8.
Key Takeaways
Last Updated: Mar 27, 2024

Setting up Node.js on Windows

Author Manvi Chaddha
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Node.js is a very powerful javascript-based platform built on the Google chrome JavaScript V8 engine. Node.js has a unique advantage because millions of front-end developers that write JavaScript for the browser can now write the server-side code and the client-side code without the need to learn a completely different language.

In general, 

Node.js = Runtime Environment + JavaScript Library

This blog will help you install Node.js on a windows system.

Prerequisites

There are some prerequisites for the installation of Node.js on windows.

  1. A user account with administrator privileges so that you may easily download and install the software.
  2. Access to the windows command line or Windows PowerShell in administrator mode.

How to install Node.js on Windows

The first step in using Node.js is the installation of Node.js libraries on the client system. Follow these steps to install Node.js in windows:

Step 1) Download the Node.js installer for Windows.

In the web browser, navigate to the https://nodejs.org/en/download/, click the windows installer button to download the latest stable version.

Note that the Node.js installer includes the NPM package manager.

The difference between the LTS and Current is LTS is the latest stable version of Node.js while Current is the latest version which may or may not be stable; if you don't have any specific needs, it is always recommended to download the LTS.

Click on the download; the installer will ask you the location where you want to download.


Step 2) Run the installer.

You need to double click on the downloaded .msi file to start the installation, click the run button on the first screen to start the installation process.

Click on the Next button to continue with the installation process.

Step 3) Continue with the installation steps.Review and Accept the terms and conditions and click on the Next button.

Step 4) The installer will prompt you for the installation location. 

It is recommended to leave the default settings unless you have a specific need to install it somewhere else; click on Next.

The default installation location is C:\Program Files\node.js\; you may change it by clicking on the Change button.

Step 5) The installer will prompt you to select the components to include or remove from the installation.

Unless you have a specific need, it is recommended to leave it by default. Click on the Next button.

Step 6) Start the installation process.


Step 7) Complete the installation process by clicking on the Finish button.

If everything went well, Node.js is now successfully installed on your system. 

Verifying Node.js Installation

Open a command prompt or Powershell and run the following command.

node  -v

The system will display the node.js version installed in your system.

The NPM version can also be checked in a similar manner using the command 

node -v

Updating Node.js on Windows

The first possible way to update Node.js is to download the latest version of Node.js from the official website by following the same instructions given above. Your system will automatically overwrite the older version, however, sometimes, the older version is not overwritten, and you may end up with two versions of Node.js.

To solve this problem, it is recommended to update Node.js with NPM.

  1. Before updating with NPM, check which version you are currently using by the command node -v.

2. Clear the npm cache with the command.

npm cache clean -f

3. Install n globally

npm install -g n

4. You can now use n to install the latest stable release of Node.js using the below command.

sudo n stable

Uninstall Node.js on Windows

To uninstall Node.js, follow the following steps:

  1. Click the start button, go to settings, and then Apps.
  2. Scroll down to Node.js. Click on Node.js
  3. Select Uninstall. A wizard will appear to uninstall the software.

Frequently Asked Questions

  1. How to set up Node.js on Windows?
    You can download the latest version of Node.js from the official website.
    Refer to the above article for more information.
     
  2.  What is Node.js?
    Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient perfect for data-intensive real-time applications that run across distributed devices.

Key Takeaways

This blog discussed Setting Node.js in Windows. You may refer to our blogs for web technologies for getting started with web development.

A common problem faced by all of us is that we prepare well, but we cannot solve the questions on time during online assessments. To overcome this, Coding Ninjas have come up with an online mock test series. The mock tests for leading companies like Amazon, Microsoft, Google, Adobe, Flipkart, TCS, Wipro, and Accenture are free. Our team of experts has curated and designed these online mock test series to help you prepare better for your coding interview rounds. In this online test series, you will get multiple tests that include the latest coding interview questions. Start preparing for the 2021 Amazon, Microsoft, etc., tech interviews now.

Live masterclass