Install on Windows
There are three good ways to install Node.js on Windows, plus a fourth (WSL2) that serious developers often prefer. The right pick depends on whether you need to switch versions and how closely you want to mirror your Linux production servers.
Which method to choose
Method | Best for | Multiple versions? |
|---|---|---|
| A quick, fixed single version | No |
| Scriptable install, keeps the official build | No |
| Switching versions per project | Yes |
WSL2 + Unix | Matching Linux servers; smoothest dev | Yes |
Option 1: The official installer (.msi)
Go to nodejs.org and download the LTS Windows Installer (
.msi).Run it and accept the defaults. Keep "Add to PATH" checked — this is what makes
nodework in any terminal.The "Tools for Native Modules" checkbox installs Python + Visual Studio Build Tools; only needed if you compile native add-ons (
node-gyp).Open a new PowerShell or Command Prompt window (so it picks up the new PATH) and verify.
node -v npm -v
Option 2: winget (built into Windows 10/11)
winget install OpenJS.NodeJS.LTS
winget downloads and installs the official package and updates PATH automatically. Upgrade later with winget upgrade OpenJS.NodeJS.LTS.
Option 3: nvm-windows (best for multiple versions)
nvm-windows is a separate project from the Unix nvm — different code, slightly different commands — but it does the same job: install and switch Node versions per project.
Download
nvm-setup.exefrom the nvm-windows releases page and run it.If you have an existing Node install, uninstall it first so the two do not fight over PATH.
Open a new terminal (often as Administrator the first time) and install a version.
nvm install lts nvm list nvm use 20.11.0
Option 4 (recommended): Windows Terminal + WSL2
Troubleshooting
Symptom | Fix |
|---|---|
| PATH not updated — open a new terminal or sign out/in |
Old version after upgrade | Two installs on PATH; uninstall one, check |
| Open a fresh terminal (nvm-windows swaps a symlink) |
| Run the install terminal as Administrator once |
where node # lists every node on PATH, in priority order
Verify
node -e "console.log('Hello from Windows + Node')"Hello from Windows + Node