我正在尝试学习 Angular,但我对终端的了解是初学者。安装 Angular 后,输入 ng new my-project
。我收到响应 ng: command not found
。我看到其他帖子有这个问题,我已经卸载并重新安装了 npm 和 ng。
The last step I took was npm install -g @angular/cli@latest then ng new my-project.
然后我得到 ng: command not found
。
最佳答案
猜猜你在 Windows 上运行 (使 @jowey's answe r 更直接)。
- 从你的bash正常安装Angular
$ npm install -g @angular/cli@latest
接下来是将 PATHS 重新排列为 - 新公共(public)管理
- Node
- Angular CLI
在系统环境变量中,如下图所示。
关于node.js - Angular -ng : command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46623571/