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"
- Nothing found → install (next section).
node.exeexists butGet-Commandis empty → PATH / restart problem.- Works in a new terminal but not in VS Code / IDEA → restart the IDE after install so it inherits the updated user environment.
2. Install Node on Windows
| Method | When to use | Command / link |
|---|---|---|
| Official LTS MSI | Simplest one-version setup | nodejs.org — tick “Add to PATH” |
| winget | Scriptable, no browser | winget install OpenJS.NodeJS.LTS |
| Chocolatey | Already on choco | choco install nodejs-lts |
| nvm-windows | Several Node versions per project | nvm-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
- Corrupt or partial install: repair via the MSI, or reinstall LTS.
- Execution policy blocking
npm.ps1: you will see running scripts is disabled instead of “not recognized”. Fix that with Set-ExecutionPolicy RemoteSigned or callnpm.cmd. - Someone deleted
npm.cmdfrom the Node folder — reinstall.
5. Still failing inside an editor or CI?
- VS Code / Cursor integrated terminal started before the install: Developer: Reload Window, or quit the app fully.
- Scheduled task / service may run as another user without your user PATH — set PATH on the machine scope or use the full path to
node.exe. - GitHub Actions / agents: use
actions/setup-node(or the image’s Node) rather than assuming a desktop install.
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 .