Install Node.js on Windows
Introduction
This chapter walks you through installing Node.js on Windows in a clean, repeatable way. Node.js includes the node runtime and npm (Node Package Manager), which you need to run JavaScript outside the browser and manage project dependencies. You will verify both tools so later chapters can focus on code instead of environment errors.
Prerequisites
- Windows 10 or Windows 11
- Local administrator permissions (recommended for system-wide install)
- Basic familiarity with PowerShell or Command Prompt
- Stable internet connection to download the installer
Node.js vs npm: What You Get
- Node.js: runs
.jsfiles on your machine (CLI tools, local servers, scripts) - npm: installs libraries and runs project scripts (bundlers, test runners, linters)
Both ship together in the official Windows installer. You do not need a separate npm install for this tutorial.
Choose the Right Node.js Version
For new learning projects, use the current LTS (Long-Term Support) release from nodejs.org.
| Channel | Use case | Recommendation |
|---|---|---|
| LTS | Learning, production, teams | Recommended default |
| Current | Bleeding-edge features | Optional; skip until you need it |
Match your team’s version on shared projects. Avoid very old Node.js releases for new installs unless you maintain legacy code.
Install Node.js from the Official Installer
- Open https://nodejs.org/ and download the LTS Windows installer (
.msi, x64 for most PCs). - Run the installer.
- Accept the license and use the default setup path unless your team requires otherwise.
- On the Tools screen, ensure Add to PATH (or equivalent PATH integration) is enabled.
- Complete installation and close and reopen your terminal so PATH updates apply.
Typical install location:
C:\Program Files\nodejs\Tip
Best Practice
After any installer changes PATH, always open a new PowerShell or Command Prompt window before running node --version.
Verify Installation
PowerShell
# Check Node.js version
node --version
# Check npm version
npm --versionCommand Prompt
node --version
npm --versionExpected outcome:
- Both commands print version strings (for example
v22.x.xand10.x.x) - No “not recognized” errors
Common PATH Issues on Windows
| Problem | Likely cause | Fix |
|---|---|---|
node is not recognized | PATH not updated | Re-run installer with PATH option; restart terminal |
| Old version still shown | Another Node install earlier on PATH | Check where node and remove duplicate entries |
npm fails with permission errors | Running as wrong user / policy | Run terminal as your normal user; avoid editing Program Files manually |
# See which node.exe Windows resolves first
where.exe nodeFAQ
Should I install Node.js from the Microsoft Store?
The official nodejs.org installer is usually more predictable for development: clearer PATH behavior and standard layout. Use Store builds only if your team standard requires them.
Do I need to install JavaScript separately?
No. JavaScript syntax is executed by Node.js (or a browser). Installing Node.js is what you need for command-line and server-side work in this track.
What is the difference between node and npm?
node runs JavaScript files. npm manages packages and scripts in projects. You will use both daily.
Can I have multiple Node.js versions on Windows?
Yes. Tools such as nvm-windows help switch versions per project. Start with one LTS install; add version managers when a course or team requires them.
Why does node -v work but scripts fail in a project?
The project may target a different Node version or missing dependencies. Run npm install in the project folder and check package.json engines if present.