The term 'node' is not recognized (PowerShell / CMD): fix PATH and install

You typed <code>node -v</code> or <code>npm install</code> and Windows answered that it was not a cmdlet, function, script file or operable program. The shell simply cannot find an executable named <code>node</code> on your PATH — usually because Node is not installed, or a new install has not reached this terminal yet.

The exact messages

node : The term 'node' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

# Command Prompt wording is similar:
'node' is not recognized as an internal or external command,
operable program or batch file.

The same pattern appears for npm, npx, yarn and pnpm when their install directory is not on PATH.

1. Is Node installed at all?

# PowerShell
Get-Command node, npm, npx -ErrorAction SilentlyContinue |
  Format-Table Name, Source

where.exe node
where.exe npm

# Common install locations
Test-Path "C:\Program Files\nodejs\node.exe"
Test-Path "$env:APPDATA\nvm"
Test-Path "$env:LOCALAPPDATA\Programs\node"

2. Install Node on Windows

MethodWhen to useCommand / link
Official LTS MSISimplest one-version setupnodejs.org — tick “Add to PATH”
wingetScriptable, no browserwinget install OpenJS.NodeJS.LTS
ChocolateyAlready on chocochoco install nodejs-lts
nvm-windowsSeveral Node versions per projectnvm-windows then nvm install 22 / nvm use 22

After any of these: close every PowerShell, CMD and terminal tab, open a new one, and run node -v and npm -v. Installers update the user or machine PATH; running windows keep the old copy.

3. Fix PATH when Node is already there

# See what this shell thinks PATH is
$env:Path -split ';' | Where-Object { $_ -match 'node|nvm' }

# Permanent user PATH edit (then open a NEW terminal)
[Environment]::SetEnvironmentVariable(
  "Path",
  $env:Path + ";C:\Program Files\nodejs\",
  "User"
)

Or: Start → “environment variables” → your account → Path → New → C:\Program Files\nodejs\ (or the folder where.exe node would use after a repair install). With nvm-windows, use its own nvm use … rather than hard-coding a version folder — nvm shims manage PATH for you.

4. npm / npx “not recognized” but node works

5. Still failing inside an editor or CI?

Related

Running scripts is disabled (npm.ps1) · && is not a valid statement separator · curl alias in PowerShell · Cannot find module (Node) · npm ERR! code ENOENT · npm EACCES global install · JSON formatter

Questions

What does "The term 'node' is not recognized" mean?

PowerShell looked on your PATH for node.exe (or a script named node) and found nothing. Install Node.js and open a new terminal, or add the Node folder to PATH.

How do I install Node on Windows quickly?

winget install OpenJS.NodeJS.LTS, or download the LTS MSI from nodejs.org with "Add to PATH" ticked, then restart the terminal.

Why does node -v fail in VS Code but work in a new PowerShell window?

The editor inherited the old environment. Fully quit and reopen it (or Reload Window) after installing Node.

npm is not recognized but node works — why?

Usually a broken install missing npm.cmd, or PATH pointing at a folder that only has node.exe. Repair/reinstall Node. If the message is about running scripts / npm.ps1, that is the execution-policy guide instead.

Should I use nvm-windows?

Yes if you need multiple Node versions. Install nvm-windows, then nvm install <version> and nvm use <version>. Avoid mixing a system MSI Node with nvm without cleaning PATH.

Published .

Try it

Related guides

Newest guides