【问题标题】:why is npm install -g @angular/cli not working? [closed]为什么 npm install -g @angular/cli 不起作用? [关闭]
【发布时间】:2022-01-12 04:22:13
【问题描述】:

尝试在cmd中安装angular/cli,node.js 8.1.2版

【问题讨论】:

  • 你安装了nodejs吗? nodejs.org/en 如果它已经安装,则设置 nodejs 的路径。 stackoverflow.com/questions/27864040/…
  • @MaheshKS 是的,我有 8.1.2 版
  • 在你的 CMD 运行命令 node -v 如果它产生一个错误,那么可能 nodejs 路径没有在 windows 中设置或者请重新启动(关闭并重新打开)cmd 并再次尝试安装 angular

标签: node.js angular npm cmd


【解决方案1】:

您需要定义 Nodejs 的“PATH”变量。您可以在图片中看到它的外观。

如果稍后再次打开“CMD”窗口,则可以成功完成安装过程。

【讨论】:

    猜你喜欢
    • 2018-06-06
    • 2016-11-09
    • 1970-01-01
    • 2019-12-11
    • 2021-03-06
    • 2018-07-30
    • 2018-05-08
    • 2017-09-27
    • 1970-01-01
    相关资源
    最近更新 更多