Error: TAR_BAD_ARCHIVE: Unrecognized archive format

See original GitHub issue

Description:

when I try to create a new project, I get a tar error when it downloads and extracts.

Steps to Reproduce:

ionic start app sidemenu

Output:

? Framework: Angular ✔ Preparing directory ./iga - done! ⠴ Downloading and extracting sidemenu starter (100.00%) events.js:287 throw er; // Unhandled ‘error’ event ^

Error: TAR_BAD_ARCHIVE: Unrecognized archive format at Unpack.warn (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/warn-mixin.js:19:40) at Unpack.warn (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/unpack.js:188:18) at Unpack.<anonymous> (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:82:14) at Unpack.emit (events.js:322:22) at Unpack.[emit] (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:286:12) at Unpack.[maybeEnd] (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:402:17) at Unpack.[consumeChunk] (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:434:21) at Unpack.write (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:365:25) at Unpack.end (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:479:14) at IncomingMessage.onend (_stream_readable.js:660:10) Emitted ‘error’ event on Unpack instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at Unpack.onerror (_stream_readable.js:729:7) at Unpack.emit (events.js:310:20) at Unpack.warn (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/warn-mixin.js:19:12) at Unpack.warn (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/unpack.js:188:18) [… lines matching original stack trace …] at Unpack.[consumeChunk] (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:434:21) { recoverable: false, cwd: ‘/Users/austinhunter/iga’, code: ‘TAR_BAD_ARCHIVE’, tarCode: ‘TAR_BAD_ARCHIVE’

My ionic info:

Ionic:

   Ionic CLI : 6.9.2

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.16.3
   npm    : 6.14.4
   OS     : macOS Catalina

Other Information:

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

11reactions
gilbertsminkcommented, Oct 13, 2021

Found a solution that worked for me:

https://forum.ionicframework.com/t/cannot-complete-ionic-start-command/183584/3

Check if you set a proxy with

ionic config get proxy -g So, disable it:

ionic config unset proxy -g

0reactions
vpankovcommented, Dec 12, 2020

Got same error. In my case, with --verbose flag it’s showing some 400 error in connection to some proxy api.instagram.com It seems that archive link is fine, but it crashing because he can’t download it throat this proxy. Is it normal behaviour or something wrong from my side, because it seems strange, how instagram related with ionic?

UPD: Yes, it seems that it some local issue, because I don’t see any proxies in logs from other device.

Ionic:

Ionic CLI : 6.11.7 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.5.2 @angular-devkit/build-angular : 0.1000.8 @angular-devkit/schematics : 10.0.8 @angular/cli : 10.0.8 @ionic/angular-toolkit : 2.3.3

Utility:

cordova-res (update available: 0.15.2) : 0.15.1 native-run (update available: 1.3.0) : 1.0.0

System:

NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.14.8 OS : macOS Catalina

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

TAR_BAD_ARCHIVE: Unrecognized archive format #178
Is there a problem with my system? $ npm run editorconfig > editorconfig > ec ERROR: Error: TAR_BAD_ARCHIVE: Unrecognized archive format at Unpack.warn...
Read more >
TAR_BAD_ARCHIVE and TAR_ENTRY_INVALID when trying ...
Sometimes an unexpected version format or value lands inside a package.json file. Validate if your package.json is correct.
Read more >
Unrecognized archive format when trying to extract content ...
tar: Unrecognized archive format error. If I do a file thetarfile.tar I get the type data. How can I extract the file?
Read more >
tar: Error opening archive: Unrecognized archive format
When attempting to start a new FusionAuth installation (on MacOS 10.15.7 Catalina) I get the error... tar: Error opening archive: ...
Read more >
Custom block installation ERR - Airtable Community
I get to the Blocks install step and receive this error(I am using a mac OS with ... :x: Error: TAR_BAD_ARCHIVE: Unrecognized archive...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found