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 .js files 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.

ChannelUse caseRecommendation
LTSLearning, production, teamsRecommended default
CurrentBleeding-edge featuresOptional; 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

  1. Open https://nodejs.org/ and download the LTS Windows installer (.msi, x64 for most PCs).
  2. Run the installer.
  3. Accept the license and use the default setup path unless your team requires otherwise.
  4. On the Tools screen, ensure Add to PATH (or equivalent PATH integration) is enabled.
  5. Complete installation and close and reopen your terminal so PATH updates apply.

Typical install location:

text
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

powershell
# Check Node.js version
node --version
 
# Check npm version
npm --version

Command Prompt

bat
node --version
npm --version

Expected outcome:

  • Both commands print version strings (for example v22.x.x and 10.x.x)
  • No “not recognized” errors

Common PATH Issues on Windows

ProblemLikely causeFix
node is not recognizedPATH not updatedRe-run installer with PATH option; restart terminal
Old version still shownAnother Node install earlier on PATHCheck where node and remove duplicate entries
npm fails with permission errorsRunning as wrong user / policyRun terminal as your normal user; avoid editing Program Files manually
powershell
# See which node.exe Windows resolves first
where.exe node

FAQ

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.