【问题标题】:Problems installing Angular安装 Angular 的问题
【发布时间】:2020-03-22 09:25:38
【问题描述】:

我在全局安装 Angular 时遇到问题。我已经包含了下面的错误。

C:\Users\DevSa\ng -> C:\Users\DevSa\node_modules\@angular\cli\bin\ng

> @angular/cli@8.3.19 postinstall C:\Users\DevSa\node_modules\@angular\cli
> node ./bin/postinstall/script.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @angular/cli@8.3.19 postinstall: `node ./bin/postinstall/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/cli@8.3.19 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DevSa\AppData\Roaming\npm-cache\_logs\2019-11-26T21_34_00_712Z-debug.log

【问题讨论】:

  • 你安装了 node.js 吗?您可能需要详细说明您的设置
  • 是的,我已经安装了 node js,运行 node -v 时我得到了 v10.16.3。
  • 我已经这样做了好几次了,但还是不能解决问题。还有其他建议吗?

标签: node.js angular npm angular-cli


【解决方案1】:

在环境变量 PATH 列表顶部添加 C:\Program Files\nodejs\,然后在其下方添加 C:\Users\{your username}\AppData\Roaming\npm

希望能解决您的问题。

【讨论】:

    猜你喜欢
    • 2019-05-01
    • 1970-01-01
    • 2017-06-27
    • 1970-01-01
    • 2022-06-14
    • 2018-06-05
    • 1970-01-01
    • 2017-01-08
    • 1970-01-01
    相关资源
    最近更新 更多