How to install Node and NPM on Window Computers

Node.js can be installed in different ways. This post highlights the most common and convenient ones. Official packages for all the major platforms are available at https://nodejs.dev/download/.

One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own. Other package managers for MacOS, Linux, and Windows are listed in https://nodejs.dev/download/package-manager/

Getting Started with Node.js and Npm

To publish and install packages to and from the public npm registry or a private npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. Here we will be using a node Installer manager.

Necessary Steps to follow:

  1. Understanding of the concepts involved

    1. What is NPM?

      1. Components of npm
    2. What is NodeJS?

  2. Installation Process for Node.Js and NPM

    1. Installing Node.js and NPM on Windows

Understanding of the concepts involved

Step 1: What is NPM?

The NPM – Node Package Manager is the default package manager for NodeJs. npm is the world's largest Software Registry. The registry contains over 800,000 code packages. NPM allows open-source web developers to share and borrow packages for app development. Also, it works as a command-line utility for the application for installing packages in the project, dependency management, and even version management.

What are Open-Source and open-source web developers?

Open source refers to any program whose source code is made available for use or modification as users or other developers see fit. Unlike proprietary software, open source software is developed as a public, open collaboration and made available to the public. While open source web developer works with open-source code, tweaking, improving, and building upon it to create new software for an organization.

Step 1.1: Components of NPM

  • Website: For your project, you can discover packages on the official NPM website. To manage and access various packages, you can create and set up profiles to manage and access different packages.

  • Command Line Interface (CLI): The CLI is used in the computer's terminal to interact with NPM packages and repositories.

  • Registry: It has a database of meta-data and JavaScript projects. As a result, you are free to utilize any supported NPM registry. By their conditions of use, you can also use another person's registry.

Step 1.2: What is Node.js?

Node.js is an open-source, cross-platform runtime environment for developing server-side and networking applications. Node.js applications are written in JavaScript and can run within the Node.js runtime on OS X, Microsoft Windows, and Linux. Some companies that use node.js are General Electric, GoDaddy, Microsoft, PayPal, Uber, Wikipins, Yahoo!, and Yammer. Based on Stack Overflow Developer Survey 2022. NodeJS is the most popular web development technology. Moreover, Node.js has become the most widely used tool for web development US with more than 6.3 million websites.

Installation Process for Node.Js and NPM

Step 1: Download the installer Download the Windows Installer from NodeJs' official website. Make sure you have downloaded the latest version of NodeJs. It includes the NPM package manager.

Here, we are choosing the 64-bit version of the Node.js installer.

download page at nodejs.org

Step 2: Install Node.js and NPM

After choosing the path, double-click to install .msi binary files to initiate the installation process. Then give access to run the application.

You will get a welcome message on your screen and click the “Next” button. The installation process will start.

Step 3: Accept the terms and conditions to proceed

Step 4: Choose the desired path where you want to install Node.js

By clicking on the Next button, you will get a custom page setup on the screen. Make sure you choose the npm package manager, not the default of Node.js runtime. This way, we can install Node and NPM simultaneously.

Note: You should have 143MB of space to install Node.js and npm features.

The following features will be installed by default:

  • Node.js runtime

  • Npm package manager

  • Online documentation shortcuts

  • Add to Path

Step 5: The setup is ready to install Node and NPM. Let’s click on the Install button

To Check if the installation is successful, open the command prompt and type cmd or window command prompt

To confirm Node installation, type node -v command.

To confirm NPM installation, type npm -v command.

And you don’t need to worry if you see different numbers than mine as Node and NPM are updated frequently.

In my case, the version of node.js is v16.17.0 and npm is 8.19.2

9
Subscribe to my newsletter

Read articles from Kingsley Okoronkwo directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kingsley  Okoronkwo
Kingsley Okoronkwo

I am a Software Developer from Nigeria