To install npm on Windows 11, install Node.js, because npm is included with it. Go to the Node.js download page, download the LTS Windows installer (.msi), run it, and accept the defaults. Then open a new Terminal window and type npm -v. If a version number appears, npm is installed. You can also install it with one command: winget install OpenJS.NodeJS.LTS.
Applies to: Windows 11 Home and Pro on x64 and Arm PCs, with Node.js 24 LTS. The steps also work in Windows 10. Last reviewed October 7, 2026.

What npm is
npm (Node Package Manager) installs JavaScript libraries and tools, such as React, Vite, TypeScript or ESLint, and runs project scripts. It ships with Node.js, the program that runs JavaScript outside a browser, so there’s no separate npm installer for Windows. Installing Node.js gives you node, npm and npx.
Which installation method should you use?
- Node.js installer: the easiest choice if you’re learning or need one version of Node.js.
- winget: the same result as the installer, from a single command.
- nvm-windows: best if you work on several projects that need different Node.js versions. Microsoft recommends a version manager for developers in its guide to installing Node.js on Windows.
- WSL: install Node.js inside Linux on Windows if your project runs on Linux servers or uses Linux-only tools.
Choose the LTS (long-term support) version unless a project specifically needs the newest release. LTS versions get bug and security fixes for about three years.
Method 1: Install with the Node.js installer
- Go to the Node.js download page.
- Choose the LTS version, Windows and your processor type: x64 for most PCs or ARM64 for Snapdragon laptops. Select Windows Installer (.msi).
- Open the downloaded file and select Next.
- Accept the license and keep the default install folder.
- On Custom Setup, make sure npm package manager and Add to PATH are included (they are by default).
- The Tools for Native Modules page offers to install Python and Visual Studio build tools. Leave it cleared unless you know your project compiles native add-ons; you can install them later.
- Select Install, approve the User Account Control prompt, and select Finish.
Method 2: Install with winget
- Right-click Start and select Terminal.
- Run:
winget install OpenJS.NodeJS.LTS - Approve the User Account Control prompt.
- Close Terminal and open a new window so it picks up the updated PATH.
To update later, run winget upgrade OpenJS.NodeJS.LTS.
Method 3: Install with nvm-windows (for developers)
- Uninstall any existing Node.js from Settings > Apps > Installed apps to avoid conflicts.
- Download nvm-setup.exe from the nvm-windows project’s releases page on GitHub (linked from Microsoft’s guide above) and run it.
- Open a new Terminal window as an administrator and run
nvm install lts. - Run
nvm use ltsto switch to it. Usenvm listto see installed versions andnvm usewith a version number to switch between them.
Check that npm works
- Open a new Terminal window. Windows that were open during installation don’t see the new PATH.
- Run
node -v. You should see a version such asv24.x.x. - Run
npm -v. You should see npm’s version number.
Update npm
npm sometimes releases updates between Node.js versions. To get the latest npm, open Terminal and run:
npm install -g npm@latest
Updating Node.js itself (with the installer, winget or nvm-windows) also updates npm to the version bundled with it.
Use npm for the first time
- Create a folder for your project, open it in File Explorer, right-click inside it and select Open in Terminal.
- Run
npm init -yto create a package.json file. - Install a package, for example
npm install lodash. npm downloads it into a node_modules folder and records it in package.json. - To install a command-line tool for all projects, add
-g, for examplenpm install -g typescript. - To run a tool once without installing it, use
npx, for examplenpx create-vite@latest.
Method 4: Install npm in WSL
If your project will run on Linux servers, or uses tools that expect Linux, install Node.js inside the Windows Subsystem for Linux instead of on Windows itself.
- Install WSL if you haven’t already. See how to install WSL on Windows 11.
- Open your Linux distribution, such as Ubuntu, from the Start menu.
- Install nvm for Linux by following the instructions in Microsoft’s Node.js guide linked above, then close and reopen the Ubuntu window.
- Run
nvm install --lts, then check withnode -vandnpm -v.
Keep projects that use WSL inside the Linux file system (your Linux home folder) rather than on the Windows C: drive. File access across the two systems is much slower and can cause npm installs to take far longer.
Useful npm settings and commands
npm config get prefixshows where global packages are installed.npm list -g --depth=0lists the global packages you’ve installed.npm outdatedshows which packages in a project have newer versions;npm updateinstalls them within the ranges in package.json.npm cache verifychecks npm’s download cache. If installs keep failing with corrupted-file errors,npm cache clean --forceclears it.npm ciinstalls exactly what’s in a project’s lock file, which is useful when you clone someone else’s project.
Troubleshooting
“npm is not recognized as an internal or external command”
Windows can’t find npm on the PATH. Close every Terminal and Command Prompt window and open a new one. If it still fails, restart the PC. If that doesn’t help, reinstall Node.js and make sure Add to PATH is included.
“npm.ps1 cannot be loaded because running scripts is disabled”
PowerShell’s execution policy blocks npm’s script. Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned in PowerShell and confirm with Y. This allows local scripts for your account only. You can also use Command Prompt, which isn’t affected.
EACCES or EPERM permission errors
Another program, often antivirus or a code editor, is locking files. Close your editor, try again, and avoid installing projects inside protected folders such as C:\Program Files.
“gyp ERR!” when installing a package
The package needs to compile native code. Install the build tools: rerun the Node.js installer and select Tools for Native Modules, or install Visual Studio Build Tools with the C++ workload.
The wrong Node.js version runs
You may have two installations. Run where node to see every copy on the PATH, then uninstall the ones you don’t need.
Frequently asked questions
Can I install npm without Node.js?
No. npm needs Node.js to run, so the official way to get npm on Windows is to install Node.js.
Where does npm install global packages?
Run npm root -g to see the folder. With the standard installer it’s in your user profile under AppData\Roaming\npm.
How do I uninstall Node.js and npm?
Open Settings > Apps > Installed apps, find Node.js, and select Uninstall. Then delete the npm and npm-cache folders in AppData\Roaming and AppData\Local if you want a clean slate.
What other developer tools should I install?
Most JavaScript projects also need Git. See how to install Git on Windows 11.
Related: How to install Python IDLE in Windows 10.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.