Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM windows install .zip download fails with TAR_BAD_ARCHIVE #247

Open
leggetter opened this issue May 11, 2023 · 1 comment
Open

NPM windows install .zip download fails with TAR_BAD_ARCHIVE #247

leggetter opened this issue May 11, 2023 · 1 comment

Comments

@leggetter
Copy link
Contributor

Steps to reproduce

In a Windows Powershell run:

npm i @tigrisdata/tigris-cli@1.0.0

You will see the following output:

npm ERR! code 1
npm ERR! path C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js install
npm ERR! Downloading from URL: https://github.com/tigrisdata/tigris-cli/releases/download/v1.0.0/tigris_1.0.0_windows_amd64.zip
npm ERR! node:events:489
npm ERR!       throw er; // Unhandled 'error' event
npm ERR!       ^
npm ERR!
npm ERR! Error: TAR_BAD_ARCHIVE: Unrecognized archive format
npm ERR!     at Unpack.warn (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\warn-mixin.js:21:40)
npm ERR!     at Unpack.warn (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\unpack.js:229:18)
npm ERR!     at Unpack.<anonymous> (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:83:14)
npm ERR!     at Unpack.emit (node:events:523:35)
npm ERR!     at [emit] (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:303:12)
npm ERR!     at [maybeEnd] (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:426:17)
npm ERR!     at [consumeChunk] (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:458:21)
npm ERR!     at Unpack.write (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:385:25)
npm ERR!     at Unpack.end (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:505:14)
npm ERR!     at PassThrough.onend (node:internal/streams/readable:713:10)
npm ERR! Emitted 'error' event on Unpack instance at:
npm ERR!     at Unpack.onerror (node:internal/streams/readable:793:14)
npm ERR!     at Unpack.emit (node:events:511:28)
npm ERR!     at Unpack.warn (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\warn-mixin.js:21:12)
npm ERR!     at Unpack.warn (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\unpack.js:229:18)
npm ERR!     [... lines matching original stack trace ...]
npm ERR!     at Unpack.write (C:\Users\phil\AppData\Roaming\npm\node_modules\@tigrisdata\tigris-cli\node_modules\tar\lib\parse.js:385:25) {
npm ERR!   recoverable: false,
npm ERR!   cwd: 'C:/tmp',
npm ERR!   code: 'TAR_BAD_ARCHIVE',
npm ERR!   tarCode: 'TAR_BAD_ARCHIVE'
npm ERR! }
npm ERR!
npm ERR! Node.js v20.1.0

However, if you download https://github.com/tigrisdata/tigris-cli/releases/download/v1.0.0/tigris_1.0.0_windows_amd64.zip directly you can unzip it, and it contains tigris.exe and a direction called completion.

Suggested fix

Unknown.

Determine why a valid zip file isn't a supported archive in the Tigris CLI installation process and work from there.

@leggetter
Copy link
Contributor Author

It looks like the CLI is trying to untar a zip file. I'll look at adding unzipping. I'll also run the install process locally as I didn't fully end-to-end test #240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant