简体   繁体   中英

When trying to install angular, ng command is not found

After installing angular, I tried the ng -v command though it keeps showing me the command is not found.

node vsn 12.9.1 npm vsn 6.10.2

I have tried reinstalling, and tried uninstalling angular.

/na

-bash: ng: command not found

I had this issue a while back, I had installed and reinstalled multiple times. It turned out I wasn't running the CMD as administrator and it wouldn't let me use the angular CLI

*Solution was to set up and alias like so

alias ng="/Users/YourName/.npm-global/bin/ng"

None of this helped me, at the end I had to use nvm as described here

Angular CLI ng command not found on Mac Os

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM