Why is npm throwing the error "checksum failed while installing @angular/cli"?
I deleted the file package-lock.json
and re-ran npm install
.
Local setup issues are tough to debug as there's a lot of trial and error, keeping a list of what you've tried and resulting outcomes.
This is an attempt at a list of suggestions. I suspect you've tried many of these, I hope this helps organize your efforts.
- Verify npm registry:
npm get registry
(expect: https://registry.npmjs.org/) - Update npm to latest:
npm install npm@latest -g
- Remove
package-lock.json
- Uninstall npm completely before reinstalling, including npm and npm-cache directories:
sudo npm uninstall npm -g
- Uninstall node completely (including npm again) and reinstalling
Along the way, I did come across similar github issues:
- integrity checksum failed when using sha1 - Node v8+ (see comment)
Hi @Rogasch I will suggest you to completely uninstall node and npm. Also delete npm and npm-cache folder. And reinstall using node-v6.11.2-x86.msi installer. ð 3 ❤️ 1
i had the same issue and npm install -g npm fixed it for me
I got this problem when I got package-lock.json included in the commit. After removing package-lock.json I could run npm install without errors again.
- npm WARN registry Unexpected warning for https://registry.npmjs.org/ (OPEN)