庆典在/ usr/bin中/ NG:在角
问题描述:
没有这样的文件或目录当我跑我的ng serve
角项目,它给这个错误:庆典在/ usr/bin中/ NG:在角
bash: /usr/bin/ng: No such file or directory
npm install -g @angular/cli
答
我面对我已经运行同样的问题,这是什么对我有用。 1)通过运行找到.bashrc文件ls -la ~/ | more
2)在编辑器中打开,在我的情况下emacs emacs ~/.bashrc
3)在文件末尾添加一个别名,像这样指向ng目录的右边路径alias ng="/usr/local/lib/node_modules/@angular/cli/bin/ng"
4)保存该文件,并通过运行sudo source ~/.bashrc
现在试运行ng -v
要使用此命令安装它,您必须运行命令行实用程序,根/管理员。你在使用哪个系统?苹果系统 ? Linux? Windows? – Pac0
(我说的是'NPM安装-g') – Pac0
我使用Linux 16.04。 –