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.
My npm version is 5.3.0.
The error:
npm ERR! code EINTEGRITY
npm ERR! sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== integrity checksum failed when using sha512: wanted sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== but got sha512-WXI95kpJrxw4Nnx8vVI90PuUhrQjnNgghBl5tn54rUNKZYbxv+4ACxUzPVpJEtWxKmeDwnQrzjc0C2bYmRJVKg==. (65117 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-11-29T05_33_52_182Z-debug.log
See https://github.com/npm/npm/issues/16861
This worked for me:
npm cache verify
Then I re-ran:
npm install -g create-react-app
And it installed like as expected: Issue resolved
Other solutions mentioned in the github issue include:
npm cache clean --force
OR
Deleting npm and npm-cache folders in Users%username%\AppData\Roaming
(windows 7) and running npm install
OR
Update npm by via npm i -g npm
OR
Delete package-lock.json
OR
npm cache verify
OR
npm cache clean
OR
Do these steps to fix the problem:
npm outdated -g
sudo npm i -g outDatedPKG
sudo npm i -g npm
package-lock.json
file._cacache
directory in ~/.npm
:
npm cache verify
npm cache clean --force
OR
.npmrc
in ~
directory: proxy=http://localhost:8123
https-proxy=http://localhost:8123
OR
npm cache clear --force && npm install --no-shrinkwrap --update-binary
OR
npm config set package-lock false