angular-cli: Again "npm WARN tarball tarball data for @angular/core@~8.0.3 seems to be corrupted."

🐞 Bug report

Command (mark with an x)

- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

No, it suddenly started to happen always

Description

It is a problem that has already come up on several occasions. When I run ng new name I get the following warning: npm WARN tarball tarball data for @angular/core@~8.0.3 (sha512-IIxrtIPNuv2+HudER9J1nmPGiGJ4aRpeiFM9V4lSiSFv50RzuaoG60XqYIpUyuBdgvyKigcrfSbu9+x1vyN0hw==) seems to be corrupted. Trying one more time.

πŸ”¬ Minimal Reproduction

In my case it is enough to execute: ng new login

What I do is a clean installation of Node, deleting the folder npm and npm-cache previ- ously. Then I simply install Angular and install correctly with: npm install -g @angular/cli

πŸ”₯ Exception or Error


npm WARN tarball tarball data for @angular/core@~8.0.3 (sha512-IIxrtIPNuv2+HudER9J1nmPGiGJ4aRpeiFM9V4lSiSFv50RzuaoG60XqYIpUyuBdgvyKigcrfSbu9+x1vyN0hw==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for typescript@~3.4.3 (sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for typescript@3.4.4 (sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\0.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\1.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\2.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\3.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\4.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\index.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\Proyectos\Angular\login\node_modules\.staging\core-js-631c2b81\stage\pre.js'

It takes almost an hour to try the installation

🌍 Your Environment

The last environment is the following:


Microsoft Windows [Version 10.0.17134.829]
node -v: v12.5.0
npm -v: 6.9.0

ng version:
Angular CLI: 8.0.6
Node: 12.5.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.800.6
@angular-devkit/core         8.0.6
@angular-devkit/schematics   8.0.6
@schematics/angular          8.0.6
@schematics/update           0.800.6
rxjs                         6.4.0

Anything else relevant? Como he dicho he probado con multiples versiones distintas y convinaciones de muchas versiones de Node, NPM y Angular CLI

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Finally I found a solution using Yarn as a package manager:

  1. Install yarn: npm install -g yarn
  2. Install Angular CLI: npm install -g @angular/cli
  3. Changue Angular CLI package manager: ng config -g cli.packageManager yarn
  4. Now you can use ng new name

It’s the only way it worked for me. Please, turn to this in future problems like mine.