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

Created on 2 Jul 2019  Β·  17Comments  Β·  Source: angular/angular-cli

🐞 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 [email protected] (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

Most helpful comment

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.

All 17 comments

I want to add that I have already searched for several solutions and none of them works for me

@FelipeSanchezCalzada did you try to update your dependencies?

Would you provide a minimal demo where we can reproduce the problem?

@mgechev
How can I update the dependencies of Angular CLI?

When I execute ncu -u i get:



Upgrading D:\Proyectos\Angular\login\package.json
[====================] 30/30 100%

 @angular/animations                  ~8.0.3  β†’    ~8.1.0
 @angular/common                      ~8.0.3  β†’    ~8.1.0
 @angular/compiler                    ~8.0.3  β†’    ~8.1.0
 @angular/core                        ~8.0.3  β†’    ~8.1.0
 @angular/forms                       ~8.0.3  β†’    ~8.1.0
 @angular/platform-browser            ~8.0.3  β†’    ~8.1.0
 @angular/platform-browser-dynamic    ~8.0.3  β†’    ~8.1.0
 @angular/router                      ~8.0.3  β†’    ~8.1.0
 rxjs                                 ~6.4.0  β†’    ~6.5.2
 tslib                                ^1.9.0  β†’   ^1.10.0
 @angular-devkit/build-angular      ~0.800.6  β†’  ~0.801.0
 @angular/cli                         ~8.0.6  β†’    ~8.1.0
 @angular/compiler-cli                ~8.0.3  β†’    ~8.1.0
 @angular/language-service            ~8.0.3  β†’    ~8.1.0
 @types/node                          ~8.9.4  β†’  ~12.0.10
 @types/jasmine                       ~3.3.8  β†’   ~3.3.13
 @types/jasminewd2                    ~2.0.3  β†’    ~2.0.6
 codelyzer                            ^5.0.0  β†’    ^5.1.0
 karma-coverage-istanbul-reporter     ~2.0.1  β†’    ~2.0.5
 karma-jasmine-html-reporter          ^1.4.0  β†’    ^1.4.2
 protractor                           ~5.4.0  β†’    ~5.4.2
 ts-node                              ~7.0.0  β†’    ~8.3.0
 tslint                              ~5.15.0  β†’   ~5.18.0
 typescript                           ~3.4.3  β†’    ~3.5.2

Run npm install to install new versions.

Finally, when I run npm install i get


npm WARN tarball tarball data for @angular/compiler@~8.1.0 (sha512-+o4jR7WfqR39zgGk7gwpxZfd2hS3X2qgr17mUCeqQkKj0gh+GYWj7OlSuYXG63OS9S4iLsKQiVUYYgqdNSK5mg==) seems to be corrupted. Trying one more time.

The error in my case is always replicated, I do not do anything to obtain it, I simply create a new project. It does not matter if the Node installation is clean, the error always happens

Thanks for your quick response

This doesn't seem like a problem in the CLI though. Maybe you're behind a proxy which corrupts the packages?

i have the deffault proxy. I am from Spain
npm config get proxy: null

I have attached the npm configuration, in case it is useful:

;;;;
; npm userconfig file
; this is a simple ini-formatted file
; lines that start with semi-colons are comments.
; read npm help config for help on the various options
;;;;

audit=false

;;;;
; all options with default values
;;;;
; access=null

; allow-same-version=false

; always-auth=false

; also=null

; audit=true

; audit-level=low

; auth-type=legacy

; before=null

; bin-links=true

; browser=null

; ca=null

; cafile=undefined

; cache=C:UsersfelipAppDataRoamingnpm-cache

; cache-lock-stale=60000

; cache-lock-retries=10

; cache-lock-wait=10000

; cache-max=null

; cache-min=10

; cert=null

; cidr=null

; color=true

; depth=null

; description=true

; dev=false

; dry-run=false

; editor=notepad.exe

; engine-strict=false

; force=false

; fetch-retries=2

; fetch-retry-factor=10

; fetch-retry-mintimeout=10000

; fetch-retry-maxtimeout=60000

; git=git

; git-tag-version=true

; commit-hooks=true

; global=false

; globalconfig=C:UsersfelipAppDataRoamingnpmetcnpmrc

; global-style=false

; group=0

; ham-it-up=false

; heading=npm

; if-present=false

; ignore-prepublish=false

; ignore-scripts=false

; init-module=C:Usersfelip.npm-init.js

; init-author-name=

; init-author-email=

; init-author-url=

; init-version=1.0.0

; init-license=ISC

; json=false

; key=null

; legacy-bundling=false

; link=false

; local-address=undefined

; loglevel=notice

; logs-max=10

; long=false

; maxsockets=50

; message=%s

; metrics-registry=null

; node-options=null

; node-version=12.5.0

; offline=false

; onload-script=null

; only=null

; optional=true

; otp=null

; package-lock=true

; package-lock-only=false

; parseable=false

; prefer-offline=false

; prefer-online=false

; prefix=C:Program Filesnodejs

; preid=

; production=false

; progress=true

; proxy=null

; https-proxy=null

; noproxy=null

; user-agent=npm/{npm-version} node/{node-version} {platform} {arch}

; read-only=false

; rebuild-bundle=true

; registry=https://registry.npmjs.org/

; rollback=true

; save=true

; save-bundle=false

; save-dev=false

; save-exact=false

; save-optional=false

; save-prefix=^

; save-prod=false

; scope=

; script-shell=null

; scripts-prepend-node-path=warn-only

; searchopts=

; searchexclude=null

; searchlimit=20

; searchstaleness=900

; send-metrics=false

; shell=C:WINDOWSsystem32cmd.exe

; shrinkwrap=true

; sign-git-commit=false

; sign-git-tag=false

; sso-poll-frequency=500

; sso-type=oauth

; strict-ssl=true

; tag=latest

; tag-version-prefix=v

; timing=false

; tmp=C:UsersfelipAppDataLocalTemp

; unicode=false

; unsafe-perm=true

; update-notifier=true

; usage=false

; user=0

; userconfig=C:Usersfelip.npmrc

; umask=0

; version=false

; versions=false

; viewer=browser

; _exit=true

; globalignorefile=C:UsersfelipAppDataRoamingnpmetcnpmignore

This seems like a problem with your node/npm and not with Angular CLI.

Please have a look at the fixing npm permissions page, common errors page, npm issue tracker, or open a new issue in that issue tracker if the problem you are experiencing isn't known.

I suggest you try to use npm clear cache --force and npm install afterwards

Thanks.

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.

@FelipeSanchezCalzada thanks for sharing your findings!

I have the same problem, but with angular version 8.1.0. The trick with the yarn solved it. Thanks!

npm WARN tarball tarball data for @angular/compiler@~8.1.0 (sha512-+o4jR7WfqR39zgGk7gwpxZfd2hS3X2qgr17mUCeqQkKj0gh+GYWj7OlSuYXG63OS9S4iLsKQiVUYYgqdNSK5mg==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for @angular/core@~8.1.0 (sha512-GviWJjOu6LJMYNbukdSK35VaXvSrp5LTNd0FbXoBQF+mhVVV/8cG4hTKKjxG1xwWXI5E1t5U4aUKXrKUNJ1sQg==) seems to be corrupted. Trying one more time.
Microsoft Windows [Version 10.0.17763.475]
node -v: v10.16.0
npm -v: 6.9.0



md5-b82955ac2a3358679df0ef1d52d2c92b



Angular CLI: 8.1.0
Node: 10.16.0
OS: win32 x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.0
@angular-devkit/build-angular     0.801.0
@angular-devkit/build-optimizer   0.801.0
@angular-devkit/build-webpack     0.801.0
@angular-devkit/core              8.1.0
@angular-devkit/schematics        8.1.0
@ngtools/webpack                  8.1.0
@schematics/angular               8.1.0
@schematics/update                0.801.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Thank you very much
I was facing the same issue for couple of days. It was a problem with my node package manager. So, I tried the above mentioned solution. It worked for me.

Thank you very much
I was facing the same issue for couple of days. It was the problem with my node package manager. So, I tried the above mentioned solution. It worked for me.

Hello, I tried the suggestion, and I got this error instead:

c:cygwin64homexxxangular8code>npm install -g yarn
c:homexxxnpmyarn -> c:homexxxnpmnode_modulesyarnbinyarn.js
c:homexxxnpmyarnpkg -> c:homexxxnpmnode_modulesyarnbinyarn.js

c:cygwin64homexxxangular8code>npm install -g @angular/cli
c:homexxxnpmng -> c:homexxxnpmnode_modules@angularclibinng

@angular/[email protected] postinstall c:homexxxtnpmnode_modules@angularcli
node ./bin/postinstall/script.js

c:cygwin64homexxxangular8code>ng config -g cli.packageManager yarn

c:cygwin64homexxxangular8code>ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ https://sass-lang.com/documentation/syntax#scss
]
CREATE my-app/angular.json (3681 bytes)
CREATE my-app/package.json (1280 bytes)
CREATE my-app/README.md (1022 bytes)
CREATE my-app/tsconfig.json (543 bytes)
CREATE my-app/tslint.json (1988 bytes)
CREATE my-app/.editorconfig (246 bytes)
CREATE my-app/.gitignore (631 bytes)
CREATE my-app/browserslist (429 bytes)
CREATE my-app/karma.conf.js (1018 bytes)
CREATE my-app/tsconfig.app.json (270 bytes)
CREATE my-app/tsconfig.spec.json (270 bytes)
CREATE my-app/src/favicon.ico (5430 bytes)
CREATE my-app/src/index.html (292 bytes)
CREATE my-app/src/main.ts (372 bytes)
CREATE my-app/src/polyfills.ts (2838 bytes)
CREATE my-app/src/styles.scss (80 bytes)
CREATE my-app/src/test.ts (642 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (662 bytes)
CREATE my-app/src/app/app-routing.module.ts (246 bytes)
CREATE my-app/src/app/app.module.ts (393 bytes)
CREATE my-app/src/app/app.component.html (1152 bytes)
CREATE my-app/src/app/app.component.spec.ts (1095 bytes)
CREATE my-app/src/app/app.component.ts (211 bytes)
CREATE my-app/src/app/app.component.scss (0 bytes)
CREATE my-app/e2e/protractor.conf.js (810 bytes)
CREATE my-app/e2e/tsconfig.json (214 bytes)
CREATE my-app/e2e/src/app.e2e-spec.ts (635 bytes)
CREATE my-app/e2e/src/app.po.ts (251 bytes)
error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/core/-/core-8.2.1.tgz: 27660:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
".
Package install failed, see above.

Angular CLI: 8.2.1
Node: 12.8.0
OS: win32 x64
Angular:
...

Package Version

@angular-devkit/architect 0.802.1
@angular-devkit/core 8.2.1
@angular-devkit/schematics 8.2.1
@schematics/angular 8.2.1
@schematics/update 0.802.1
rxjs 6.4.0

I would greatly appreciate any help. I cannot create any angular projects, since I updated to angular8. This is frustrating beyond belief. Thanks in advance.

Cheers.

Hello, I tried the suggestion, and I got this error instead:

c:cygwin64homexxxangular8code>npm install -g yarn
c:homexxxnpmyarn -> c:homexxxnpmnode_modulesyarnbinyarn.js
c:homexxxnpmyarnpkg -> c:homexxxnpmnode_modulesyarnbinyarn.js

c:cygwin64homexxxangular8code>npm install -g @angular/cli
c:homexxxnpmng -> c:homexxxnpmnode_modules@angularclibinng

@angular/[email protected] postinstall c:homexxxtnpmnode_modules@angularcli
node ./bin/postinstall/script.js

c:cygwin64homexxxangular8code>ng config -g cli.packageManager yarn

c:cygwin64homexxxangular8code>ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ https://sass-lang.com/documentation/syntax#scss
]
CREATE my-app/angular.json (3681 bytes)
CREATE my-app/package.json (1280 bytes)
CREATE my-app/README.md (1022 bytes)
CREATE my-app/tsconfig.json (543 bytes)
CREATE my-app/tslint.json (1988 bytes)
CREATE my-app/.editorconfig (246 bytes)
CREATE my-app/.gitignore (631 bytes)
CREATE my-app/browserslist (429 bytes)
CREATE my-app/karma.conf.js (1018 bytes)
CREATE my-app/tsconfig.app.json (270 bytes)
CREATE my-app/tsconfig.spec.json (270 bytes)
CREATE my-app/src/favicon.ico (5430 bytes)
CREATE my-app/src/index.html (292 bytes)
CREATE my-app/src/main.ts (372 bytes)
CREATE my-app/src/polyfills.ts (2838 bytes)
CREATE my-app/src/styles.scss (80 bytes)
CREATE my-app/src/test.ts (642 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (662 bytes)
CREATE my-app/src/app/app-routing.module.ts (246 bytes)
CREATE my-app/src/app/app.module.ts (393 bytes)
CREATE my-app/src/app/app.component.html (1152 bytes)
CREATE my-app/src/app/app.component.spec.ts (1095 bytes)
CREATE my-app/src/app/app.component.ts (211 bytes)
CREATE my-app/src/app/app.component.scss (0 bytes)
CREATE my-app/e2e/protractor.conf.js (810 bytes)
CREATE my-app/e2e/tsconfig.json (214 bytes)
CREATE my-app/e2e/src/app.e2e-spec.ts (635 bytes)
CREATE my-app/e2e/src/app.po.ts (251 bytes)
error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/core/-/core-8.2.1.tgz: 27660:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:wsdepsopensslopensslsslrecordssl3_record.c:677:
".
Package install failed, see above.

I would greatly appreciate any help. I cannot create any angular projects, since I updated to angular8. This is frustrating beyond belief. Thanks in advance.

Cheers.

Please follow the official guide in https://yarnpkg.com/lang/en/docs/install/#windows-stable.

Install Yarn without using NPM

Thanks for the prompt response. I installed yarn using the msi from the link you provided. But now I get the following error:

error An unexpected error occurred: "https://registry.yarnpkg.com/@angular%2fplatform-browser: 32240:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
".
Package install failed, see above.

Ran it again and I got this error:

error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/core/-/core-8.2.1.tgz: 30220:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
".
Package install failed, see above.

It seems unstable.

Very thanks Felipe.
It works on yarn package manager.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajjejosefsson picture rajjejosefsson  Β·  3Comments

NCC1701M picture NCC1701M  Β·  3Comments

jmurphzyo picture jmurphzyo  Β·  3Comments

ericel picture ericel  Β·  3Comments

purushottamjha picture purushottamjha  Β·  3Comments