Install Node.js on Windows
If you just want it done fast, winget is the easiest route.
Option A: one command with winget (recommended)
- Open Windows Terminal or PowerShell
- Run:
powershell
winget install OpenJS.NodeJS.LTS- When it finishes, check the install:
powershell
node -v
npm -vIf you see version numbers, the install worked.
Option B: the official MSI installer (more visual)
- Go to the Node.js website: https://nodejs.org/
- Download the
LTS(long-term support) release - Double-click the
.msiand click through with the defaults - When it finishes, open Windows Terminal or PowerShell and check the install:
powershell
node -v
npm -vIf you see version numbers, the install worked.
Option C: Scoop or Chocolatey (if you already use a package manager)
With Chocolatey:
powershell
choco install nodejs-ltsWith Scoop:
powershell
scoop install nodejs-ltsTroubleshooting
1) "not recognized as an internal or external command"
Usually PATH just hasn't refreshed:
- Close every terminal window and open a new one
- Still failing? Restart your computer
2) npm installs are slow (optional)
If npm downloads crawl on your network, you can switch to a mirror registry (and switch back any time):
powershell
npm config set registry https://registry.npmmirror.comCheck that it took effect:
powershell
npm config get registry