1

I am trying to start a new project with ionic start myApp blank and selecting React. After I press enter, I see this output.

⠦ Downloading and extracting blank starter (100.00%)
events.js:174
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.Parser.on._ (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:82:14)
at Unpack.emit (events.js:194:15)
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:651:10)
Emitted ‘error’ event at:
at Unpack.onerror (_stream_readable.js:713:12)
at Unpack.emit (events.js:189:13)
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.write (/usr/local/lib/node_modules/@ionic/cli/node_modules/tar/lib/parse.js:365:25)

I have uninstalled and reinstalled the @ionic/cli package. This behavior also applied to the Angular option as well and other template options. I am on macOS Catalina, 10.15.3. How can I resolve this?

cfoster5
  • 1,696
  • 5
  • 28
  • 42

3 Answers3

3

for me, deleting the ~/.ionic/ folder helped, as there seemed to be some corrupted data, and ionic re-generates that folder for you

Jared Forth
  • 1,577
  • 6
  • 17
  • 32
alphuman
  • 31
  • 5
0

According to this issue with points to comment here try doing following

npm install -g ionic

then run ionic info

0

It works well after deleting the ~/.ionic/

Ionic CLI                     : 6.12.1
Ionic Framework               : @ionic/angular 5.4.3
NodeJS : v12.16.1
npm    : 6.13.4
Jason G
  • 128
  • 1
  • 9