ng: command not found while running for Angular project using angular-cli

╄→尐↘猪︶ㄣ 提交于 2021-01-07 06:31:31

问题


While using ng command for mac terminal, complaining ng command not found, though it is installed properly.

  1. Used the following for each terminal session to resolve ng command.

alias ng="/Users/<user_name>/.npm-global/bin/ng"

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!