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
- Search “environment variables” → edit “Path”
- Add the Node.js install path (e.g.,
C:\Program Files\nodejs\) - 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.
Related Posts
- How to Install Git on Windows and Configure It
- Manage Node.js Versions with nvm
- Fix npm Cache Problems
- How to Handle Paths with Spaces on Windows
Recommended Services
- Fiverr - Find freelance developers and tech experts