Angular CLI: zsh: command not found: ng / 'ng' is not recognized as an internal or external command
The Angular CLI is not installed globally or its folder is not on your PATH.
ng: command not foundzsh: command not found: ng'ng' is not recognized as an internal or external commandbash: ng: command not foundng is not recognized as the name of a cmdlet Meaning
Install it with npm install -g @angular/cli, or avoid global installs and use npx ng … / the project's node_modules/.bin. If it was installed but the command is missing, the npm global bin folder is not in PATH (common with nvm or after changing Node versions).
Common causes
@angular/clinot installed globally- npm global bin directory not in
PATH - Switched Node version with nvm (global packages are per version)
- Corporate machine without admin rights installing to a protected folder
- Typo (
ng-serve)
⚡ Quick fix
- Install:
npm install -g @angular/cli - Or run through npx:
npx ng serve - Add the npm global bin folder to PATH
Detailed fix by platform
Linux
npm config get prefixthen add<prefix>/binto PATH; with nvm reinstall the CLI under the active versionnpx @angular/cli@latest new my-appcreates a project without a global install
Windows
- Check
npm config get prefixand add that folder to the user PATH; restart the terminal
Code examples
Use the project-local CLI
npx ng version # uses node_modules/.bin/ng if present
npm i -D @angular/cli # local install, then: npm run ng -- serveHow to diagnose
- Install — Is @angular/cli installed? (npm ls -g)
- PATH — Is the npm bin folder in PATH?
- Node — Same Node version as when installed?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- command not found bash: command not found
- Could not find the builder's node package Angular CLI: Could not find the '@angular-devkit/build-angular:browser' builder's node package / Cannot find module '@angular-devkit/build-angular/package.json'
- ENOENT npm ERR! enoent ENOENT: no such file or directory, open '/path/package.json'
Most viewed in Angular
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026