简体   繁体   English

错误:npm install -g angular-cli npm ERR

[英]Error: npm install -g angular-cli npm ERR

npm i
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 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! Unexpected end of JSON input while parsing near '...lar/compiler-cli/-/co'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lookang/.npm/_logs/2020-05-20T09_09_02_104Z-debug.log
[ERROR] An error occurred while running subprocess npm.

If you get this error simply follow these steps the solution is to reinstall Angular CLI after clearing npm cache如果您收到此错误,只需按照以下步骤操作,解决方案是在清除 npm 缓存后重新安装 Angular CLI

$ npm cache clean --force
$ npm install -g @angular/cli@latest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM