Why does the newest Angular CLI have a corrupted packages?

I was getting the same below error when attempting to a create new project using ng new command.

npm WARN tarball tarball data for @angular/compiler@~7.2.0 (sha512-5yb4NcLk8GuXkYf7Dcor4XkGueYp4dgihzDmMjYDUrV0NPhubKlr+SwGtLOtzgRBWJ1I2bO0S3zwa0q0OgIPOw==) seems to be corrupted. Trying one more time.

I tried many things but what did not worked and what finally worked for me I have listed below. My working node version is 12.2.0 and npm version is 6.9.0 (i.e. latest version).

What did not worked:

  1. Downgraded node js to other lower versions (tried many version)
  2. Deleted package-lock.json file from project and executed npm install
  3. Executed npm install --registry https://registry.cnpmjs.org instead of npm install
  4. Deleted npm and npm-cache folders from AppData\Roaming and then again installed node js
  5. Deleted node_modules folder, executed npm update and then executed npm install
  6. Executed npm cache clean --force and then executed npm install
  7. Reinstalled @angular/cli
  8. Checked for any firewall / antivirus (in my case it was disabled)
  9. Opened node command prompt as an administrator
  10. Checked user permissions for the project folder

Finally what worked is:

Installed the component for which it was giving error. npm install -global @angular/compiler


I had the same problem with node 12.13.0 and npm 6.13.0

npm WARN tarball tarball data for @angular/compiler@^7.2.11 (sha512-5yb4NcLk8GuXkYf7Dcor4XkGueYp4dgihzDmMjYDUrV0NPhubKlr+SwGtLOtzgRBWJ1I2bO0S3zwa0q0OgIPOw==) seems to be corrupted. Trying one more time.

For me the problem was npm. After upgrading npm to the newest version with npm i -g npm@latest the problem vanished. So it seems to be a problem with npm itself and not the Angular/CLI.


upgrade your NPM version use this command i -g npm@latest it works like magic