>我试图创建一个新的角度项目,在编写"ng new project"后,它开始下载,但随后给我这个错误:
Installing packages...npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
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 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 '...EmGWKHtdKonmvJ5sCP6T'
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersUSERAppDataRoamingnpm-cache_logs2020-05-13T09_41_32_733Z-debug.log
× Package install failed, see above.
有谁知道出了什么问题? TNX
这是由于您的缓存已损坏而发生的。您需要清理缓存并重新安装 @angular/cli。
打开命令提示符并运行以下命令。
npm cache clean --force
npm install -g @angular/cli