Dev Tools

'node' is not recognized on Windows — every real cause + fix

Fix Node.js not being found in PowerShell, VSCode terminal, or Command Prompt after installation. Every path that could break, explained.

You installed Node.js. Ran node --version. Got:

node : The term 'node' is not recognized as the name of a cmdlet, function,
script file, or operable program.

Even though the installer said “success”. Even though winget says it’s installed. Here’s every real cause.

Cause 1 (80%) — PowerShell not restarted after install

Windows PATH is loaded when a terminal opens. If PowerShell was open BEFORE Node was installed, it has stale PATH.

Fix: Close PowerShell COMPLETELY (all windows). Reopen. Try again.

node --version

If it prints a version number, PATH loaded correctly and you’re done. If it still says “not recognized”, keep reading.

Cause 2 (10%) — VSCode terminal specifically stale

VSCode terminal inherits environment when VSCode started. Even if you restart the terminal panel, VSCode itself might still have stale env.

Fix:

  1. Close VSCode completely (all windows)
  2. Reopen VSCode
  3. Open new terminal (Ctrl + `)
  4. node --version should now work

Cause 3 (5%) — Installer didn’t add to PATH

Some installations skip adding Node to PATH (rare, but happens with custom install).

Verify Node exists:

Get-ChildItem "C:\Program Files\nodejs" -ErrorAction SilentlyContinue

If you see node.exe, npm.cmd listed → Node is installed but PATH is missing.

Temporary fix (this session only):

$env:Path += ";C:\Program Files\nodejs"
node --version

Permanent fix (user PATH):

[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\nodejs", "User")

Close + reopen ALL terminals.

Cause 4 (3%) — Corporate laptop blocks Node executables

Windows AppLocker or corporate security policy blocks unsigned/new executables.

Symptoms:

  • Installer completes but node.exe throws “blocked by administrator”
  • Or VSCode extensions get “temporarily blocked” message
  • Or PowerShell prints “operation was blocked”

Fix options:

  • File ticket with IT to whitelist Node
  • Use Node.js from Microsoft Store (some corporate laptops allow that)
  • Use online sandbox instead (Replit, StackBlitz, Codespaces — no local install)

Cause 5 (2%) — Multiple Node versions installed, wrong one on PATH

If you installed Node twice (once via installer, once via nvm), PATH might point to broken one.

Diagnose:

where.exe node

Shows every location node.exe exists in your PATH. If multiple → you have conflict.

Fix: uninstall duplicates. Reinstall single version.

The nuclear reset (fixes everything)

If nothing works, this reset is nuclear but guaranteed:

# Uninstall completely
winget uninstall OpenJS.NodeJS.LTS
winget uninstall OpenJS.NodeJS

# Restart Windows
# Reinstall
winget install OpenJS.NodeJS.LTS

# Restart Windows AGAIN

Between installs, you can also delete C:\Program Files\nodejs and %APPDATA%\npm if they exist.

After Node works — verify npm too

npm --version

Should also show a version. If Node works but npm doesn’t, that’s a separate issue (npm not on PATH, or corrupt install). Usually the nuclear reset fixes both.

Prevent this from happening again

  1. Always fully restart the terminal after installing anything
  2. Check where.exe <command> if something’s not found — tells you exactly what PATH sees
  3. On corporate laptops: use online sandboxes for early experimentation

Alternative: skip local Node entirely

For learning JS/Astro/React, you don’t need Node locally. Use:

  • StackBlitz (stackblitz.com) — instant React/Vue/Astro in browser
  • CodeSandbox — same
  • GitHub Codespaces — full VSCode + Node in browser (60 hours/month free)
  • Gitpod — similar (50 hours/month free)

Zero install, zero PATH issues, zero corporate blocking. Downside: needs internet.

Same PATH issue causes ALL of these:

  • git : not recognized (Git not on PATH after install)
  • docker : not recognized (Docker CLI not on PATH)
  • python : not recognized (Python installer forgot PATH — common)
  • code : not recognized (VSCode not on PATH — install “Add to PATH” option)

Same fix: restart terminal, verify install location, add to PATH if missing.

Bottom line

99% of “not recognized” errors on Windows = PATH not refreshed after install.

Close everything. Reopen. Retry. Works.

Recommended

DevOps YAML Pack

36 production-ready configs — Kubernetes, Docker Compose, GitHub Actions, Terraform, Helm, Ansible. Every file heavily commented. Copy, paste, ship.

Get the pack — ₹499 →
Never miss an article