创建一个新的Angular项目

时间:2020-08-13 07:58:34

标签: javascript node.js angular web

im试图创建一个新的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.

1 个答案:

答案 0 :(得分:0)

您是否使用ng new?您的ng --version是什么?您确定自己也使用Angular CLI是最新的吗? (此外,您至少应使用Node LTS版本(目前为12.18),并使用node -v进行检查。)

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