Quick Overview:
Installing NPM on Windows is a streamlined task, but making any wrong configurations can cost you a lot of time and effort. But you can trust this guide for a smooth NPM installation procedure. It’ll guide you through two primary approaches to installing NPM on Windows within the shortest time possible and without any errors.
Install npm on Windows
NodeJS is a high-end development technology used by industry professionals to improve performance and speed. To utilize it for your project, you need to install it first using the NPM. As most of the developers utilize a Windows OS, we are going to learn about the procedure to install NPM on Windows in the easiest way possible.
So, let’s get started.
What and Why Install NPM on Windows?
NPM is Node Package Manager, which is used to install Node JS on your development machine. It’s based on JRE (Java Runtime Environment), which provides essential support to curate high-end business applications with dynamic user needs.
In addition, it also helps in managing the reusable codebases so that they can be shared for other project needs to minimize development time, effort, and cost. Moreover, if you need a third-party package, NPM can be used to download, install, and utilize it.
Prerequisites To Install NPM Windows Version
Before you begin the NPM installation, ensure that your system aligns with the following requirements.
- An active internet connection to download the installation package
- 4GB RAM
- Intel Core i3 Processor with 2.50 Ghz
- 256GB ROM
How To Install NPM on Windows: The Traditional Way
Firstly, we’ll learn about the traditional way of installing NPM on a Windows system. It mainly consists of two parts, in which the installation package is downloaded and then run on the system. The entire process is streamlined in the steps provided below.
Step 1: Utilize a web browser and navigate to the official website of NodeJS. On the site, look for the “Download for Windows” option and click on the desired version according to requirements. You can select between the 64-bit and 32-bit installation packages.
![how to instal node](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-1024x451.webp)
Step 2: Open the location of the downloaded package on your Windows machine. The package must be available under the download folder or any other location you have defined.
![choose location of the downloaded package](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-2-1024x507.webp)
Step 3: After finding the package with the “.msi” extension, run it using the double-click. You need to provide the relevant permissions to execute the installation.
Once the package starts running, you will see a new window with the “Node.js Setup” title. Here, you are required to click “Next”.
![node.js setup](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-3-1024x489.webp)
Step 4: Accept the T&C (terms and conditions) to move further. It’s compulsory to agree to defined terms. Otherwise, the installation will be forfeited.
![accept the terms and conditions to install](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-4-1024x300.webp)
Step 5: Define the path where you want to install the node package manager. If you don’t provide a custom path, it’ll be installed at the default location, which is “program files” under the “C Drive.”
![define path where you want to install node package](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-5-1024x328.webp)
Click “Next” for further procedure.
Step 6: At this step, don’t change any of the default settings, as it can create additional complexities. A total of four settings that you have previously configured are displayed. This step is more of a confirmation.
Again, click “Next” and move ahead.
![confirm the installation](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-6-1024x490.webp)
Step 7: Click on the “Install” button and initiate the final installation on the Windows system. You have to wait for some time until the process is completed. In addition, live progress will be displayed on your screen.
![install node.js](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-7-1024x485.webp)
Step 8: The setup interface will display the message that NPM and NodeJS are successfully installed.
![npm and node.js has been installed](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-8-1024x494.webp)
Step 9: After NPM is installed on Windows, confirm its availability of it by using the CMD.
After opening CMD, run the following commands.
Command 1: npm -v
Command 2: node -v
Both these commands will output the version of NPM and NodeJS, which are available on your Windows machine.
How To Install NPM in Windows Machine: The Chocolatey Way
Using Chocolatey software for installing NPM on Windows systems is an alternative way used by professionals. You can follow this approach by executing the following steps.
Step 1: Download and install the Chocolatey on your Windows device. To do this, navigate to the official Chocolatey website and click “Get Started.”
![install npm on windows](https://positiwise.com/blog/wp-content/uploads/2024/05/How-to-Install-Node-9-1024x448.webp)
Step 2: Choose the “individual” and open PowerShell with administrator access on your machine.
![install npm from powershell](https://positiwise.com/blog/wp-content/uploads/2024/05/install-npm-on-windows-2-1024x448.webp)
Step 3: On PowerShell, run the “Get-ExecutionPolicy” command. You will receive an output message “Restricted” for it.
Following it, run another command, “Set-Execution Policy All Signed,” choose “A,” and then hit “Enter.”
![set execution policy all signed](https://positiwise.com/blog/wp-content/uploads/2024/05/install-npm-on-windows-3-1024x562.webp)
Step 4: Copy the following commands and paste them into your PowerShell CLI. It will install the Chocolatey.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol =[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Step 5: To verify Chocolatey installation, run the “choco -version” command on PowerShell. It will return the Chocolatey version.
![verify chocolatey installation](https://positiwise.com/blog/wp-content/uploads/2024/05/install-npm-on-windows-4-1024x551.webp)
Step 6: Now, remain on PowerShell and run the following command to install NPM on Windows using Chocolatey.
Command: Choco installs -y nodejs.install
Step 7: Lastly, run the command “node –version” on PowerShell to ensure that NodeJS is installed. If NodeJS is available, it means that NPM is also installed and available to use. You will see an output similar to the following snippet.
![node.js and npm has successfully installed](https://positiwise.com/blog/wp-content/uploads/2024/05/install-npm-on-windows-5-1024x594.webp)
Concluding Up
The node package manager is mainly used to install the node JS on a system. Installing it on the Windows operating system is quite easy and streamlined. However, there are two ways, and you can opt for any of them according to your convenience. First, you download the installation package from the official website and run it. In the second method, you need chocolatey software, which you utilize for NPM installation.
It all depends on how you want to install NPM Windows, but both ways take minimal time and install NPM successfully.
Expert in Software & Web App Engineering
Parag Mehta, the CEO and Founder of Positiwise Software Pvt Ltd has extensive knowledge of the development niche. He is implementing custom strategies to craft highly-appealing and robust applications for its clients and supporting employees to grow and ace the tasks. He is a consistent learner and always provides the best-in-quality solutions, accelerating productivity.