【问题标题】:creating a new Angular project创建一个新的 Angular 项目
【发布时间】:2020-12-03 00:50:31
【问题描述】:

我正在尝试创建一个新的 Angular 项目,但我收到了这个错误。我也安装了一个更新的节点。

- Installing packages...
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/socket.io-adapter failed, reason: connect ETIMEDOUT 104.16.23.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...\r\n-----END PGP SIGN'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AUGUST\AppData\Roaming\npm-cache\_logs\2020-08-13T07_26_40_996Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.

【问题讨论】:

    标签: javascript node.js angular web


    【解决方案1】:

    你在使用ng new吗?你的ng --version 是什么,你确定你也是最新的 Angular CLI 吗? (另外,您应该至少使用 Node LTS 版本(目前为 12.18),请咨询node -v)。

    另外,请尝试清理缓存: npm cache clean --force 然后再次尝试该命令。

    【讨论】:

    • 好的,谢谢。尽管有时它会显示不同的错误。还是关于折旧的东西等等。我会找出解决方案非常感谢。
    猜你喜欢
    • 2017-09-03
    • 2018-04-19
    • 1970-01-01
    • 2019-10-18
    • 1970-01-01
    • 2013-11-12
    • 2018-10-31
    • 1970-01-01
    相关资源
    最近更新 更多