How to Install Node.js and NPM on Windows? [Step-by-Step] (2024)

Node.jsis a cross-platform environment that runs and executesJavaScriptcodes outsidethebrowser. Since its first release,Node.js has gained massive popularity among developers. Asituses JavaScript, it is fast and easy to pick up and avails excellent scalability, making it afavouriteamong web developers. The Node.js framework is available for all the major operating systems like Windows, Ubuntu, and Mac. To know more, check outKnoweldgeHutNode.js course.

Are you ready to start working with node.js? Before anything else, let usunderstandhow to install node.js on windows 10.

What’s NodeJS?

Node.js is a runtime environment that enables developers to execute JavaScript on the server side, without using a web browser. Traditionally, JavaScript was limited to client-side development and ran exclusively in web browsers. Node.js transformed this by allowing JavaScript to be used for server-side scripting, developing scalable network applications, and carrying out activities like file system tasks and database interactions.

What is NPM?

NPM, or Node Package Manager, is a key tool for JavaScript developers. It simplifies the management of packages, which are collections of code that others develop and make available for you to use in your own projects. NPM allows developers to avoid reinventing the wheel, instead leveraging existing solutions to create strong and feature-rich apps.

Prerequisites to Install and Setup Node.js on Windows

Below we get started, here are a few system requirements to download, install, and set up Node.js on Windows 10.

Hardware requirements

  • RAM 4GB
  • CPU Intel Core i3TMi3 HQ CPU @2.50 GHz
  • ROM 256 GB

Software requirement:Chocolatey

Attention:You will also need a stable internet connection because we will be downloading most of this software.

How to Install Node.js and NPM on Windows? Step-by-Step

Undoubtedly, the first step to gettingstarted on working with node.js is installing the software package in your system. Once done, follow the step-by-step tutorial on how toproceed to get the node.js framework successfully installed in your system.We will also look at how you can uninstall the program from yourcomputer completely.

Step-1: Download node.js installer into your system

Visit the official node.js sitehttps://nodejs.org/en/download/and click on Windowsinstaller to download the necessary software in your system. The installer contains the NPM package. Based on the system you want to install, choose 32-bit installer or 64-installer and proceed.

How to Install Node.js and NPM on Windows? [Step-by-Step] (1)

Note:When you click on download, you will be asked to choose the file location you want to store theinstal.msibinary files.Choose asecurefile locationof your choice.

How to Install Node.js and NPM on Windows? [Step-by-Step] (2)

Step-2: Run the installation

Once you choose the path, the next step is to double-click the instal.msibinary files to initiate the installation process. Furthermore, you will be asked for permission to run the application.

Warning: On the open file security warning, there is a cancel option as well. Don't click on the cancel option, or else you may perhaps need to restart the installation. You can use the back button to check your previous installation step.

On running the application, you will proceed to an interface with a welcome message. Click the "Next" button and proceed with the installation as shown in the image.

How to Install Node.js and NPM on Windows? [Step-by-Step] (3)

Step-3: Accept the terms of usage

How to Install Node.js and NPM on Windows? [Step-by-Step] (4)

After clicking the next option, you will get an end-user license agreement. Read the terms of using the software, and then click on next.

N.B. You will find a square box asking you to agree with the terms, and only when you have read the terms, you will be allowed to proceed further.

Step-4: Specify the path

Once you have accepted the terms and conditions, the next step is to specify the path where you want to install node.js for windows. Your file location is the path where you must install the node.js in your system. Before we proceed further,you canenrollinWeb Design Trainingto accelerate your career.

How to Install Node.js and NPM on Windows? [Step-by-Step] (5)

Once you have specified the path, click on the Next button to proceed with the installation.

Step-5: Select the default options

On proceeding with the Next option, the custom page setup will open up on the screen. Here you will get four icons as stated below:

  • node.js runtime
  • NPM package manager
  • Online documentation shortcuts
  • Add to PATH

How to Install Node.js and NPM on Windows? [Step-by-Step] (6)

Select all the options as default and then proceed with the Next option.

Step 6 Initiate the installation of Node.js on windows

After all these steps, you will see an install button to process the installation of node.js on Windows. Click on the install button to initiate the installation of node.js on your Windows. Based on your system performance it may take a couple of minutes to install node.js on your system. Once the installation is complete, you will get a message on your screen as — Node.js has been successfully installed.

How to Install Node.js and NPM on Windows? [Step-by-Step] (7)

Step-7: Complete the installation

On clicking the Finish button, the process of installation of node.js is successfully completed. Congratulations! You have successfully installed node.js on your Windows 10.

How to Install Node.js and NPM on Windows? [Step-by-Step] (8)

How to Verify if Node.js is Installed or Not?

To verify that the node.js has been successfully installed in your system, go to the command prompt and run it as administrator. Now use the following command to check the node.jsversion installed in your system.

node -v

The message v14.16.1 verifies that node.js has been successfully installed on your windows, and you are ready to use it.

How to Install Node.js and NPM on Windows? [Step-by-Step] (9)

Alternative Method of Installing Node.js on Windows [Using Chocolatey]

Do you know there is also an alternative way to download & install Node.js and NPM on Windows 10?Using a software package manager called Chocolatey, you can install node.js and NPMon your machine. Let us understand how toinstall node.js and NPM on windows using Chocolateystep by step.We will also look at how to uninstall the same with Chocolatey.

Installing Chocolatey

The first process that you need to do is to installChocolateyin yoursystem. Take a note thattheinstallation of Chocolatey requires administrator access to the computer’s command prompt to run.

  • Choose the option – get started as shown below:

How to Install Node.js and NPM on Windows? [Step-by-Step] (10)

  • Once you go to the official Chocolatey website, select the individual as shown in the picture.

How to Install Node.js and NPM on Windows? [Step-by-Step] (11)

  • Open Windows PowerShell and run as administrator.Now run the command and then press enter.

Get-ExecutionPolicy

  • On running this command, you will get a message as Restricted. Once you get the message as Restricted, continue and then runanothercommand and press enter.

Set-Execution PolicyAll Signed

How to Install Node.js and NPM on Windows? [Step-by-Step] (12)

  • You will get a screen with execution policy changes. Select the A (Yes to all) option and then press Enter.

How to Install Node.js and NPM on Windows? [Step-by-Step] (13)

  • Copy and paste the command mentioned below:
Set-ExecutionPolicyBypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.ServicePointManager]::SecurityProtocol-bor3072;iex((New-ObjectSystem.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

How to Install Node.js and NPM on Windows? [Step-by-Step] (14)

To check whether you have installed it well, open the command prompt below:

choco-version

If you have installed it well, you will see the display of the Chocolatey version you have installed on the screen as below:

How to Install Node.js and NPM on Windows? [Step-by-Step] (15)

Boom! Chocolatey is now successfully installed in your system.

How to InstallNode.jsand NPM Using Chocolatey?

Using Chocolatey that you have just installed, now we can install Node.js in windows system. Open the command prompt as the administrator and put in the Chocolatey command prompt as mentioned below:

Choco install -ynodejs.install

To confirm if it has installed correctly on the computer, you need to execute the command below on the computer command prompt, as an administrator:

node --version

How to Install Node.js and NPM on Windows? [Step-by-Step] (16)

If you have followed the steps correctly, the installation would have been successful and the message below will display on your screen after the installation has been completed.

After installing the Node.js, the Node Package ManagerNPMautomatically gets installed in the system. Run the command below to check the installation ofNPM. The displayed message below verifies that the installation ofNPMis successful.

How to Install Node.js and NPM on Windows? [Step-by-Step] (17)

How to Write Your First Program on Node.js?

Now that you have successfully downloaded and installed node.js in your system, let’s learn how to write a program usingnode.js

Follow the steps to write your first program.

  • Step 1:Create a folder and name it. (Here we have created a folder named NodePrograms.
  • Step 2:Open any code editor of your choice (here we are using Visual Studio Code).

How to Install Node.js and NPM on Windows? [Step-by-Step] (18)

  • Step 3:Click on the file menu and open the folder you just created.

How to Install Node.js and NPM on Windows? [Step-by-Step] (19)

  • Step 4:Once you open the folder, create a file and name it. (Here we have created a file named as welcome.js)

How to Install Node.js and NPM on Windows? [Step-by-Step] (20)

  • Step 5:Write your program and save it using (Ctrl + S).
  • Step 6:Start debugging using the shortcut f5.

How to Install Node.js and NPM on Windows? [Step-by-Step] (21)

And that’s it! You have successfully created your first project using node.js.

(Goodbye-COVID-19 was the message we wanted toprintand it is running successfully).

How to Uninstall Node.js?

Uninstalling node.js needs a manual process. Here is a step-by-step guide on how to uninstall node.js from your system.

  • Step 1:Goto the file location where you have stored node.js

How to Install Node.js and NPM on Windows? [Step-by-Step] (22)

  • Step 2:Select the node.js row and right-click on it. Out of the three options available, click on uninstall.

How to Install Node.js and NPM on Windows? [Step-by-Step] (23)

  • Step 3:After clicking on the uninstall option, the uninstalling starts.

How to Install Node.js and NPM on Windows? [Step-by-Step] (24)

Once done, you will successfully uninstall node.js from your system.

Are you ready to unlock the power of coding? Discover the endless possibilities with Python programming. Join us andlearn Python programmingin a unique and engaging way. Start your coding journey today!

Summary

In this article we have covered how toinstallNode.js and NPM on windowswiththehelp oftheMSI installation modulefrom theNode.js website.Besides, we have also learned toinstall the necessary modulesneededto run a Node.js application.

In a nutshell, we have seen how toinstall node.js using different methods.That’s all you need to get started with node.js. You are free to choose any terminal of your preference.If you want to learn more about Nodejs to upskill your career, you can take our Node JS Certification Course.

How to Install Node.js and NPM on Windows? [Step-by-Step] (2024)

FAQs

How to install Node.js and npm on Windows? ›

How to Install Node.js and NPM on Windows?
  1. Step 1: Download the Installer. Download the Windows Installer from NodeJs official website. ...
  2. Step 2: Install Node.js and NPM. After choosing the path, double-click to install .msi binary files to initiate the installation process. ...
  3. Step 3: Check Node.js and NPM Version.
Feb 15, 2024

How do I make sure node and npm are installed? ›

Test it!
  1. Test Node. To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v . ...
  2. Test NPM. To see if NPM is installed, type npm -v in Terminal. ...
  3. Create a test file and run it. A simple way to test that node.

How do I add npm and node to path in Windows? ›

To set the PATH for node. js and npm follow these steps:
  1. Step 2: Search for environment variables in the global search.
  2. Step 3: Click Environment Variables.
  3. Step 4: On System Variables, select Path and click edit.
  4. Step 6: Reload your terminal window and now it should be fixed.
Apr 4, 2024

How to install Node.js correctly? ›

Installation of NodeJS and NPM is straightforward using the installer package available at NodeJS official web site.
  1. Download the installer from NodeJS WebSite.
  2. Run the installer.
  3. Follow the installer steps, agree the license agreement and click the next button.
  4. Restart your system/machine.

What is the command for npm install? ›

npm install (in package directory, no arguments): Install the dependencies in the local node_modules folder. In global mode (ie, with -g or --global appended to the command), it installs the current package context (ie, the current working directory) as a global package.

How to check if npm is installed? ›

To see if NPM is installed, type npm -v in Terminal.

How to install node packages using npm? ›

Download a Package

Open the command line interface and tell NPM to download the package you want. Now you have downloaded and installed your first package! NPM creates a folder named "node_modules", where the package will be placed. All packages you install in the future will be placed in this folder.

Which path to run npm install? ›

You should run it in your project root folder, or the folder above your node_modules folder as sometimes the structure can differentiate between projects. But in general: the root folder of your project, as long as it is one folder above your node_modules.

How do I start Node.js after installation? ›

The usual way to run a Node.js program is to run the globally available node command (once you install Node.js) and pass the name of the file you want to execute. While running the command, make sure you are in the same directory which contains the app.js file.

How to install Node.js on Windows specific version? ›

js versions.
  1. Step 1: Download and Install nvm-windows. Go to the nvm-windows releases page on GitHub. ...
  2. Step 2: Install Node. js Versions using nvm-windows. ...
  3. Step 3: Use a Specific Node. js Version. ...
  4. Step 4: Verify Installation.
Apr 24, 2024

How to setup a Node.js application? ›

  1. Install Node.js.
  2. Install a text editor or IDE.
  3. Start a new Node.js project with npm init.
  4. Install Express.js and the Twilio Node.js SDK.
  5. Create a simple Express.js application.
  6. Install ngrok for local development.
  7. Where to next with Express and Node?
  8. More Node.js and Express resources and guides.

Does installing Node.js also install npm? ›

NPM is included with Node. js installation. After you install Node. js, verify NPM installation by writing the following command in terminal or command prompt.

How to install NVM and npm on Windows? ›

Installing nvm on Windows
  1. Download the latest version of NVM for Windows. ...
  2. Open the terminal and run the nvm list available command to see a list of Node versions that are available to download and install.
  3. Run the nvm use command, followed by the version number of Node you want to use (e.g. nvm use 16.9.
Jan 20, 2022

How to install Node.js and npm in non admin access Windows machines? ›

How to set up
  1. Create a folder in any path you want. ...
  2. Move node.exe from step 2 to the folder you created.
  3. Move npm.cmd from step 2 to the folder you created.
  4. Move npm_modules/npm from step 2 to the folder you created.
  5. Open the “Run” dialog.
  6. Types rundll32 sysdm.cpl,EditEnvironmentVariables into Run dialog and execute.
Sep 24, 2023

How to install Node.js in Windows using zip? ›

Download the nvm-setup.zip file for the most recent release. Once downloaded, open the zip file, then open the nvm-setup.exe file. The Setup-NVM-for-Windows installation wizard will walk you through the setup steps, including choosing the directory where both nvm-windows and Node.js will be installed.

Top Articles
How New York’s Statutes of Limitations on Debt Protect You
SHA-2 vs. SHA-1: The Complete Rundown
13 Easy Ways to Get Level 99 in Every Skill on RuneScape (F2P)
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Wellcare Dual Align 129 (HMO D-SNP) - Hearing Aid Benefits | FreeHearingTest.org
Unlocking the Enigmatic Tonicamille: A Journey from Small Town to Social Media Stardom
Category: Star Wars: Galaxy of Heroes | EA Forums
Rls Elizabeth Nj
Zachary Zulock Linkedin
Horned Stone Skull Cozy Grove
Thayer Rasmussen Cause Of Death
Shuiby aslam - ForeverMissed.com Online Memorials
U/Apprenhensive_You8924
Tcgplayer Store
Trac Cbna
How Much You Should Be Tipping For Beauty Services - American Beauty Institute
Csi Tv Series Wiki
Craigslist Sparta Nj
Arre St Wv Srj
Rubber Ducks Akron Score
Walgreens 8 Mile Dequindre
2021 MTV Video Music Awards: See the Complete List of Nominees - E! Online
Dei Ebill
Panolian Batesville Ms Obituaries 2022
How do you get noble pursuit?
Jersey Shore Subreddit
WPoS's Content - Page 34
Taylored Services Hardeeville Sc
Elanco Rebates.com 2022
King Soopers Cashiers Check
Grandstand 13 Fenway
Max 80 Orl
Www Craigslist Com Shreveport Louisiana
Rise Meadville Reviews
Barrage Enhancement Lost Ark
Edict Of Force Poe
Giantess Feet Deviantart
Troy Gamefarm Prices
Saybyebugs At Walmart
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
Improving curriculum alignment and achieving learning goals by making the curriculum visible | Semantic Scholar
Tedit Calamity
Pixel Gun 3D Unblocked Games
Lyons Hr Prism Login
Adams-Buggs Funeral Services Obituaries
60 Days From August 16
Tanger Outlets Sevierville Directory Map
Estes4Me Payroll
Sdn Dds
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 6120

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.