I'm able to extract the tar using bash utility tar and tar node package as well. When using tar-fs or tar-stream I get:
Error: Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?
at Object.exports.decode (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/tar-stream/headers.js:267:43)
at Extract.onheader (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/tar-stream/extract.js:123:39)
at Extract._write (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/tar-stream/extract.js:249:8)
at doWrite (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/readable-stream/lib/_stream_writable.js:405:139)
at writeOrBuffer (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/readable-stream/lib/_stream_writable.js:394:5)
at Extract.Writable.write (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/readable-stream/lib/_stream_writable.js:303:11)
at ReadStream.ondata (_stream_readable.js:713:22)
at ReadStream.emit (events.js:203:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
Emitted 'error' event at:
at errorOrDestroy (internal/streams/destroy.js:107:12)
at Extract.onerror (_stream_readable.js:737:7)
at Extract.emit (events.js:203:13)
at Extract.onheader (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/tar-stream/extract.js:125:12)
at Extract._write (/home/tiagonapoli/Desktop/tmp/tar-fs-test/node_modules/tar-stream/extract.js:249:8)
[... lines matching original stack trace ...]
at ReadStream.emit (events.js:203:13)
Since yarn uses this package I'm having this issue with yarn as well.
I have the following repository with the specific file that
tar-stream
is throwing error: https://github.com/tiagonapoli/tar-fs-testI'm able to extract the tar using bash utility
tar
andtar
node package as well. When usingtar-fs
ortar-stream
I get:Since yarn uses this package I'm having this issue with yarn as well.