创建新的角度项目错误

时间:2020-08-03 04:00:54

标签: node.js angular npm angular-cli

我想创建一个新的有角度的项目,因为我开始使用ng new hello-world的项目开始将其卡在| Installing packages...中并发出警告

Installing packages...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 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

npm WARN deprecated har-validator@5.1.5: this library is no longer supported

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 '.../chai":"^3.4.34","@ty'

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\Devendra Mulewa\AppData\Roaming\npm-
cache\_logs\2020-08-03T03_43_38_617Z-debug.log

× Package install failed, see above.
The Schematic workflow failed. See above.

1 个答案:

答案 0 :(得分:1)

这为我解决了

打开cmd /终端作为管理员模式。

执行以下命令,

npm cache clean --force

npm install