gpt4 book ai didi

node.js - ng :command not found in node v6. 9.1

转载 作者:搜寻专家 更新时间:2023-11-01 00:39:11 24 4
gpt4 key购买 nike

我正在尝试在我的 Windows 10 PC 的 angular-cli 项目中执行一个 ng 命令。 Node v6.9.1

  • 全局安装 angular-cli。
  • 尝试了全新的 npm 安装。
  • 尝试添加路径
    C:\Users\MohamadS\AppData\Roaming\npm\node_modules\angular-cli\bin在路径变量中的用户变量中。

还是如图所示。

enter image description here

需要帮助解决这个问题。

PS- 不能使用任何 ng 命令。( ng g c/componentName/, ng build)

已编辑 -

  • 也在项目文件夹中尝试使用相同的 angular-cli 版本进行全局安装。

最佳答案

查看npm path是否添加到系统变量path中,我有 npm v4.0.2,我只是做了一个 npm install npm@latest -g并再次安装了 angular-cli -g,现在可以正常工作了。

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com