angular – Error在’… ge-2.2.1.tgz“}附近解析JSON输入的意外结束,”engin“

前端之家收集整理的这篇文章主要介绍了angular – Error在’… ge-2.2.1.tgz“}附近解析JSON输入的意外结束,”engin“前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
命令:

npm install -g @angular/cli@latest

例外:

verbose stack SyntaxError: Unexpected end of JSON input while parsing
near ‘…ge-2.2.1.tgz”},”engin’ 169 verbose stack at JSON.parse
() 169 verbose stack at parseJson (C:\Program
Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-better-errors\index.js:7:17)
169 verbose stack at consumeBody.call.then.buffer (C:\Program
Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
169 verbose stack at 169 verbose stack at
process._tickCallback (internal/process/next_tick.js:188:7)

寻求帮助和支持.
谢谢

解决方法

npm cache clean --force

然后 :

npm install -g @angular/cli

如果不工作:

删除package.lock.json文件,然后重试

猜你在找的Angularjs相关文章