Symptom

'npm' is not recognized as an internal or external command,
operable program or batch file.

Cause 1: Node.js Is Not Installed

Download and install the LTS version from https://nodejs.org

Cause 2: PATH Is Not Set

  1. Search “environment variables” → edit “Path”
  2. Add the Node.js install path (e.g., C:\Program Files\nodejs\)
  3. Restart the terminal

Cause 3: PowerShell Execution Policy

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Cause 4: Terminal Not Restarted

Always restart the terminal after installing Node.js.

For a better terminal experience, see Set Up Windows Terminal.

  • Fiverr - Find freelance developers and tech experts