npm ERR! code EINTEGRITY (npm 5)

最近从npm4升级成npm5,在运行 npm install 时,报如下错误:

Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-7kVpawZ+S98Vw5VnEKTDbBfY+PA= integrity checksum failed when using sha1: wanted sha1-7kVpawZ+S98Vw5VnEKTDbBfY+PA= but got sha512-39w19Mseg83z68JsIdcuFH3Z+BR/Jc3gRBB4Pn/aUm76rdy0prMz5iIMJAOb0Bo6H/rZhQc41vFf3tAMgqufVQ==. (3203 bytes)

解决方法:

npm cache clean --force

 

 强制清除npm 的 cache. 然后再运行 npm install .

猜你喜欢

转载自wxinpeng.iteye.com/blog/2383442