更新vue-cli出现错误 npm ERR! Unexpected end of JSON input while parsing near ‘…"string.prototype.pad’
$ npm install @vue/cli -g
npm ERR! Unexpected end of JSON input while parsing near
'..."string.prototype.pad'
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\guyun\AppData\Roaming\npm-cache\_logs\2019-12-03T06_20_15_954Z-debug.log
第一步:清除缓存
npm cache clean –force
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-W9vm4WWL-1575356037776)(en-resource://database/462:1)]
第二步:重新安装vue-cli
npm install @vue/cli -g
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-fPybOC6v-1575356037777)(en-resource://database/464:0)]