Skip to content
Runbook

Install Node.js on Windows

Server-side JavaScript runtime, built on the V8 engine, shipped with the npm package manager.

Runtimejavascriptruntimebackendv8npm

Installation

winget (latest LTS) · winget
winget install OpenJS.NodeJS.LTS

Installs the latest official LTS version with npm. Restart the terminal after installation to refresh the PATH.

Verify the installation

Verify
node --version

Important files

TypePathDescription
config%USERPROFILE%\.npmrcUser configuration for npm (registry, proxy, authentication tokens).
binaryC:\Program Files\nodejs\node.exeRuntime executable installed by the official installer.

Command-line tools

  • nodeThe JavaScript runtime.
  • npmNode.js package manager.
  • npxRuns a package binary without installing it globally.
  • corepackEnables and manages pnpm and yarn.

Uninstall

Uninstall (winget)
winget uninstall OpenJS.NodeJS.LTS

Good to know

  • To manage multiple versions on Windows, use fnm or nvm-windows (a separate project from the Unix nvm).
  • Enable pnpm and yarn via Corepack with "corepack enable".
  • Corepack ships with Node through version 24; starting with Node 25 it is no longer bundled and must be installed separately (for example "npm install --global corepack"). Check what the LTS you install provides.
  • After installation, open a new terminal (PowerShell or cmd) so that the PATH variable is taken into account.

Installation on Windows

The winget package manager, built into recent versions of Windows, installs the latest official LTS with winget install OpenJS.NodeJS.LTS. This command uses the official MSI installer, which places the binaries in C:\Program Files\nodejs and adds them to the PATH. Open a new terminal after installation so that node and npm are recognized.

Managing multiple versions

The classic Unix nvm does not work on Windows. Use fnm (cross-platform, recommended) or nvm-windows, a separate project, instead. These tools let you switch between Node.js versions per project without reinstalling the MSI.

Configuration

The user configuration for npm is stored in %USERPROFILE%\.npmrc. To use pnpm or yarn without a separate installation, enable Corepack with corepack enable. Corepack ships with Node through version 24; starting with Node 25 it is no longer bundled and must be installed separately (for example with npm install --global corepack), so check what the LTS you are targeting provides.

If you compile native modules, install the Visual Studio Build Tools with the "Desktop development with C++" workload, along with Python: node-gyp detects them automatically during compilation. The official installer and winget can offer these dependencies while installing Node.js. Do not use the windows-build-tools package anymore: it has been archived since 2021 and does not work with recent Node versions.