问题
While using ng command for mac terminal, complaining ng command not found, though it is installed properly.
- Used the following for each terminal session to resolve
ng
command.
alias ng="/Users/<user_name>/.npm-global/bin/ng"
- Updated the path variable to include the bin folder and magic,
ng
command is available for each terminal.
Edit your bash profile :
vim ~/.bash_profile
Add this line:
export PATH=$PATH:/Users/<user_name>/.npm-global/bin
Save it and ng
command is available for use for each terminal session.
来源:https://stackoverflow.com/questions/65212161/ng-command-not-found-while-running-for-angular-project-using-angular-cli