npm comes bundled with Node.js, so you install it on Windows by installing Node.js: download the current LTS Windows Installer (.msi) from nodejs.org, run it with the default options (which include npm and adding Node.js to your PATH), then open a new terminal and run node -v and npm -v. Two version numbers mean you’re done.
These steps work on Windows 11 (including version 26H2) and Windows 10.
What you’re installing, and which version to pick
Node.js is a program that runs JavaScript outside a web browser. npm (Node Package Manager) is the command-line tool that downloads the code libraries, called packages, that JavaScript projects depend on. There’s no separate npm download: every Node.js installer includes it, along with npx, a companion command that runs a package’s tool without installing it permanently. Despite the similar name, Java is a separate platform, and working out which Java a Windows 11 app needs is a different job from installing Node.js.
The Node.js download page offers two release lines:
- LTS (long-term support): the stable line that gets security fixes for a long time. When this was written in November 2026, nodejs.org listed Node.js 26 as the LTS release. npm’s own documentation tells Windows users to install the version labeled LTS, because other versions haven’t been tested with npm yet.
- Current (latest): newer features sooner, with more frequent changes. Pick it only if a project or course specifically asks for it.
Before you start, you need an account that can approve the User Account Control prompt (the installer puts Node.js in Program Files), and an internet connection. Close any terminal windows you already have open; they won’t see the new install until they’re reopened.
Install Node.js and npm with the official installer
This is the route most beginners should use. It takes a few minutes.
- Open the download page. In your browser, go to the official Node.js download page. Make sure the version shown is marked LTS and that Windows and your processor type (usually x64) are selected.
- Download the installer. Under the prebuilt options, select Windows Installer (.msi). The top of the page may also show a set of version-manager commands; you can ignore those for this method.
- Run the file. Open your Downloads folder and double-click the file that starts with node-v and ends in .msi. The Node.js Setup Wizard opens. Select Next.
- Accept the license and keep the default folder. Tick the box to accept the License Agreement, select Next, and leave the destination folder as C:\Program Files\nodejs\ unless you have a reason to change it.
- Leave the features as they are. On the Custom Setup screen, the defaults already include the Node.js runtime, the npm package manager and adding Node.js to your PATH (the list of folders Windows searches when you type a command). Don’t switch any of these off. Select Next.
- Decide on “Tools for Native Modules.” The next screen has a checkbox for installing extra build tools. It runs a script that installs Chocolatey (a package manager), Python and Visual Studio build tools, which some packages need to compile C or C++ code. It’s a large download, so most beginners can leave it unticked and add the tools later if a package asks for them.
- Install. Select Install, then Yes at the User Account Control prompt. When the wizard says it completed, select Finish.
Check that npm is installed
Windows only passes the updated PATH to programs started after the install, which is why a terminal that was already open often says npm “is not recognized.” Open a fresh one:
- Select Start, type cmd or PowerShell, and open the app. If you’ve never used either, these instructions to open Command Prompt on Windows 11 cover every route, including Windows Terminal.
- Type
node -vand press Enter. You should see a version that starts with v and the LTS major number, such as v26. - Type
npm -vand press Enter. You should see npm’s own version number, which is different from the Node.js number. That’s normal.
For a quick real test, run npx cowsay hello. npx asks to download the small cowsay package, prints a cow saying hello, and doesn’t add anything to a project. Type y when asked to proceed.
If your projects also use Python, you can set up Python on your Windows PC and confirm it with a similar version check, python --version.
Other ways to install Node.js and npm
Use winget from the command line
winget, the Windows Package Manager, is built into current Windows 11 and Windows 10 PCs. It installs the same LTS release without a browser:
- Open Command Prompt or PowerShell (a normal window is fine; winget asks for permission when it needs it).
- Type
winget install OpenJS.NodeJS.LTSand press Enter. Accept the source agreement if this is your first time using winget. - When winget reports that the install succeeded, close the window, open a new one, and run
node -vandnpm -v.
The package ID OpenJS.NodeJS.LTS always follows the LTS line; OpenJS.NodeJS installs the Current line instead.
Use a version manager if you’ll switch between Node.js versions
Developers who work on several projects often need more than one Node.js version. Microsoft’s guide to setting up Node.js on native Windows recommends a version manager for that, naming nvm-windows (a free third-party project, separate from the nvm tool used on Mac and Linux) and listing alternatives. npm’s documentation also recommends a version manager, mainly because installing global packages under a system-wide install can cause permission errors. The Node.js download page itself now suggests one, fnm, in its command box.
Two rules matter if you go this way. First, remove any Node.js you installed with the .msi before installing a version manager, including a leftover C:\Program Files\nodejs folder, because mixing the two causes confusing conflicts. Second, Microsoft notes that nvm-windows is designed for one person’s PC, not a shared computer or build server. If you’re just learning, the official installer is simpler and you can switch later.
Use Linux tools through WSL instead
If your course or team works in Linux, you can install Node.js inside the Windows Subsystem for Linux. Microsoft’s advice is to keep your project files in the same file system as the Node.js you use: Windows drive folders for a Windows install, the Linux home folder for a WSL install. A Node.js installed in Windows and one installed in WSL are separate, with separate npm packages.
Fix common npm errors on Windows
“npm is not recognized as an internal or external command.” Close every terminal and open a new one first. If it still fails, sign out of Windows and back in, or restart. If that doesn’t help, run the installer again, choose Repair or check that the Add to PATH feature is set to install, and finish the wizard. Opening a new terminal after a PATH change fixes the same kind of error for other tools too, such as the g++ compiler in compiling C++ on Windows with MinGW-w64.
“npm.ps1 cannot be loaded because running scripts is disabled on this system.” This appears in PowerShell, not Command Prompt. npm installs both a PowerShell script (npm.ps1) and a regular command file (npm.cmd), and PowerShell’s execution policy can block the script. You have three safe options:
- Use Command Prompt for npm commands, where the policy doesn’t apply.
- Type
npm.cmdinstead ofnpmin PowerShell (for example,npm.cmd -v). - Allow local scripts for your account only: run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserand type Y. Microsoft’s execution policy documentation explains that RemoteSigned runs scripts written on your PC but requires a trusted signature on scripts downloaded from the internet, so it’s a reasonable middle ground. It still lowers protection compared with Restricted, so only change it on your own PC, and don’t use Unrestricted or Bypass to solve this.
The installer stops with an error or rolls back. Restart Windows, make sure you’re signed in with an account that can approve administrator prompts, and run the .msi again. Leave your security software on: download only from nodejs.org, and if your antivirus flags the file, delete it and download again rather than turning protection off. On a work or school PC, software installs may be blocked by policy, so ask your IT team.
Global package installs fail with a permissions error. With the official installer, global packages normally go into an npm folder inside your user profile, so most work in a normal window. If an install still reports EPERM or access denied, close programs that may be using the files (such as a code editor), then try again in a terminal opened with Run as administrator.
Update or remove npm and Node.js
Update npm only. npm is updated more often than Node.js. To get the latest npm, run npm install -g npm@latest, then check with npm -v in a new window. npm’s documentation gives the same command without @latest; both fetch the newest release.
Update Node.js (and its bundled npm). Download the newer LTS .msi from nodejs.org and run it. It installs over the existing copy in the same folder, so you don’t need to uninstall first. With winget, run winget upgrade OpenJS.NodeJS.LTS.
Uninstall. On Windows 11, open Settings > Apps > Installed apps, find Node.js, select the three dots next to it and choose Uninstall. On Windows 10, the same entry is under Settings > Apps > Apps & features. Packages you installed globally live in your user profile’s AppData\Roaming\npm folder and aren’t removed automatically; delete that folder too if you want a completely clean slate. For other stubborn programs, the walkthrough to uninstall apps on Windows 11 covers Control Panel and other routes.
Start your first project with npm
To see npm doing its real job, make a test project:
- In a new terminal, type
mkdir hello-npm, press Enter, then typecd hello-npmand press Enter. - Type
npm init -y. npm creates a package.json file that records your project’s name and the packages it uses. - Type
npm install lodash. npm downloads the package into a node_modules folder and adds it to package.json, plus a package-lock.json file that pins exact versions so the same install works on another PC.
When you share the project, leave out node_modules; anyone else can recreate it by running npm install in the project folder.
Common questions about npm on Windows
Is there a way to install npm without administrator rights?
The .msi installs for all users and needs administrator approval. The Node.js download page also offers a Standalone Binary (.zip) that you can extract to a folder in your user profile and run without an installer, but you then have to add that folder to your PATH yourself, and your organization’s rules still apply, so check with IT on a managed device. That approval is the User Account Control prompt, which this explanation of admin rights for Windows 11 apps breaks down for administrator and standard accounts.
Why does npm -v show a different number from node -v?
They’re separate projects with separate version numbers. Each Node.js release ships with a specific npm release, so the two numbers move together when you update Node.js, but npm can also be updated on its own.
Does npm cost anything?
No. The npm command-line tool is free and open source, and installing public packages from the npm registry is free. Paid npm plans are for organizations publishing private packages.
Should I use yarn or pnpm instead?
They’re alternative package managers that some projects prefer, but they still need Node.js installed first, and npm stays available alongside them. Use whichever one the project’s instructions name; if it doesn’t say, npm is the default.
Once npm -v returns a number, open the project or tutorial you were following and run its first npm install command.
Matthew Burleigh has been a freelance writer since the early 2000s. You can find his writing all over the Web, where his content has collectively been read millions of times.
Matthew received his Master’s degree in Computer Science, then spent over a decade as an IT consultant for small businesses before focusing on writing and website creation.
The topics he covers for MasterYourTech.com include iPhones, Microsoft Office, and Google Apps.
You can read his full bio here.