创建新 angular 项目时出错

error in creating new angular project error

我想创建一个新的 angular 项目 我使用 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\_logs20-08-03T03_43_38_617Z-debug.log

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

这帮我解决了,

以管理员模式打开cmd/terminal。

执行以下命令,

npm cache clean --force

npm install