vue项目在使用npm install安装node_modules依赖库时,出现报错npm ERR! code EINTEGRITY报错,有什么解决方法呢?
一、问题展示
首先我们看下该报错,看看你的报错是否与我的类似。
13885 error code EINTEGRITY
13886 error Verification failed while extracting terser@4.4.1:
13886 error Verification failed while extracting terser@4.4.1:
13886 error sha1-86RpwSXZoOtS8ean/f9Ye9bjWQI= integrity checksum failed when using sha1…..
13886 error Verification failed while extracting terser@4.4.1:
13886 error Verification failed while extracting terser@4.4.1:
13886 error sha1-86RpwSXZoOtS8ean/f9Ye9bjWQI= integrity checksum failed when using sha1…..
二、解决办法,亲测有效
解决办法非常简单,亲测有效,具体如下:

程序员导航
优网导航旗下整合全网优质开发资源,一站式IT编程学习与工具大全网站
第1步
删除package.lock.json文件,(如果不想更改此文件,请在安装完之后再还原即可)
第2步
执行如下指令:
npm cache clean --force
第3步
最后再去执行npm install进行安装,发现就可以正常安装了,这时候,会发现有新生成的code>package.lock.json文件,其实基本没必要再还原源文件,你需要你也可以还原。

AI 工具导航
优网导航旗下AI工具导航,精选全球千款优质 AI 工具集
三、总结
以上就是npm install时出现提示npm ERR! code EINTEGRITY错误的解决方案,而且亲测有效哦!
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...




