npm执行清理缓存失败

拉取2.x版本vue-cli时,执行npm install -g @vue/cli-init报错

npm ERR! code EINTEGRITY
npm ERR! sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== integrity checksum failed when using sha512: wanted sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== but got sha512-zkWjYRjE/LrLSc7sZ8sEeENtetdmYIoRLIOrjHPYMq26qRIrFzLQ+Y32NF9NTiHeSV8pAAmrJeb1hCSyO5AmOw==. (15740 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2020-04-09T14_44_57_948Z-debug.log

E:\visual_studio_file\vue\code\06day_Vue>npm cache clean –force
npm ERR! npm cache clear does not accept arguments

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2020-04-09T14_47_16_224Z-debug.log

发现是npm缓存出现问题,执行npm cache clean –force,清除失败报错

npm ERR! npm cache clear does not accept arguments

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2020-04-09T14_47_33_797Z-debug.log

发现我之前更新了npm版本(大于5),执行npm cache clear --force && npm install --no-shrinkwrap --update-binary,清除成功!

  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值