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.

  1. Verify npm registry: npm get registry (expect: https://registry.npmjs.org/)
  2. Update npm to latest: npm install npm@latest -g
  3. Remove package-lock.json
  4. Uninstall npm completely before reinstalling, including npm and npm-cache directories: sudo npm uninstall npm -g
  5. 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)