I am getting this error while running sudo npm install
. On my server, npm was installed earlier. I’ve tried to delete the package-lock.json
file, and ran npm cache clean --force
, but it didn’t work
When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
Share
The issue was indeed in
package-lock.json
, and after replacing it with a working version from another branch it worked.What’s interesting is seeing the diff:
So there really is some integrity checksum in the
package-lock.json
and it was replaced in ourpackage-lock.json
with a SHA1 instead of a SHA-512 checksum. See here for more info.In case you don’t have a working version in another branch. Consider the message
Find the package in
package-lock.json
using the first checksum:and put the third checksum into its “integrity” field:
A more detailed description is here.