npm ERR! code EINTEGRITY

Full error:

 

npm ERR!     C:\Users\XXX\AppData\Local\npm-cache\_logs\2022-11-02T15_03_24_716Z-debug-0.log
PS C:\Users\XXX\Desktop\ruoyi-my\ruoyi-vue-pro-master\yudao-ui-admin> npm i
npm WARN tarball tarball data for nprogress@https://registry.npmmirror.com/nprogress/-/nprogress-0.2.0.tgz (sha1-y480xTIT2JVyP8urkH6UIq28r7E=sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==) seems to be corrupted. Trying again.        
npm ERR! code EINTEGRITY
npm ERR! sha1-y480xTIT2JVyP8urkH6UIq28r7E=sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA== integrity checksum failed when using sha1: wanted 
sha1-y480xTIT2JVyP8urkH6UIq28r7E=sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA== but got sha1-y480xTIT2JVyP8urkH6UIq28r7E=. (10171 bytes)  

1. Baidu said that it may be a problem with the npm version and needs to be updated to the latest version. Although mine is already a new version, in order to prevent accidents, I executed the update command

npm install -g npm

However, there is no use for eggs, and an error is still reported!

2. grep -ir "xxx" ~/.npm

Because grep is a Linux command, Windows needs to install the corresponding module, or download the compressed package and configure the environment variables after decompression. Because I have Git, I executed it directly in the Git command window; however, it is still useless!

 3. Who said that the npm version is too high! OK, then I will downgrade the version!

npm install [email protected] -g

 Fuck! It worked! Go round and round! It turned out to be a version problem. After thinking about it, my project is Vue2. I guess the whole thing is that my npm version is a little higher. Next time I will report this error for the Vue3 project, and then I have to upgrade the npm version! Tired!

Ladies and gentlemen! If you also encounter the same problem as me, you can give priority to the problem of the fit between the npm version and the project, whether it is high or low, especially the project that has just been pulled by git!

Guess you like

Origin blog.csdn.net/m0_62639693/article/details/127661288