node.js - Angular -ng : command not found

标签 node.js angular command-line

我正在尝试学习 Angular,但我对终端的了解是初学者。安装 Angular 后,输入 ng new my-project。我收到响应 ng: command not found。我看到其他帖子有这个问题,我已经卸载并重新安装了 npmng

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

在系统环境变量中,如下图所示。

enter image description here

关于node.js - Angular -ng : command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46623571/

相关文章:

node.js - 我无法理解 websockets(通过 socket.io 和 node.js)

node.js - 是否可以在 Windows 8.1 上运行 Node.js?

javascript - 如何在nodejs和puppeteer之间交换数据?

windows - 使用 `^` 转义 Windows 批处理文件中的行尾字符在某些行上不起作用?

angularjs - 将 JSON.STRINGIFY 转换为 json 数组长度不计算

Angular 6,this.formGroup.updateValueAndValidity()无法正常工作

angular - 如何使用 ng2-file-upload 返回响应

使用 EventEmitter 处理 Angular 4 事件

python - 在python中一行打印动态字符串

windows - 将键码发送到 Windows 中正在运行的应用程序