Angular 9 throw error "ng: command not found" in MacOS
I have a project with Angular 9. After installing angular CLI with command
npm install -g angular-cli .
After that, I tried a
ng --help what gave me the following message. -bash: ng: command not found.
I check Angular CLI by using the command
npm list -g --depth=0 but it shows me that angular-cli is installed.
Riano:~ Riano$ npm list -g --depth=0 /Users/Riano/.npm/lib ├── [email protected] ├── [email protected]
I run in macOS, not in Windows OS.
Thanks for any suggestions.
Nam Vo Jun 24 2021
I fixed this issue by adding an alias in my
And it worked for me.
Minh Vĩnh Jun 24 2021
Removing NODE and using NVM instead fixed a lot of issues.
- removing Node from your system
- install NVM from here https://github.com/creationix/nvm
- Install Node via NVM:
nvm install stable
npm install -g angular-cli
On the window, you should use
npmand macOS use
Ubonwan Raksasat Jun 24 2021
I solved this issue by adding the address of the module installation at ** PATH** computer
in my case
Hope it helpful for you!!