Closed viceice closed 4 months ago
Repro steps were provided on another thread:
https://github.com/isaacs/node-tar/issues/413#issuecomment-2087181317
Ah, yes this is a dupe, should be fixed in 7.2
I have the same problem with the version tar@7.2, @types/node@20.14.2 and typescript@5.3.3.
How can I fix it?
[tsl] ERROR in /node_modules/.pnpm/tar@7.2.0/node_modules/tar/dist/commonjs/pack.d.ts(70,5)
TS2416: Property 'end' in type 'Pack' is not assignable to the same property in base type 'Minipass<ContiguousData, Buffer, WarnEvent>'.
Type '(path?: string | ReadEntry | undefined) => this' is not assignable to type '{ (cb?: (() => void) | undefined): this; (chunk: Buffer, cb?: (() => void) | undefined): this; (chunk: Buffer, encoding?: Encoding | undefined, cb?: (() => void) | undefined): this; }'.
Types of parameters 'path' and 'cb' are incompatible.
Type '(() => void) | undefined' is not assignable to type 'string | ReadEntry | undefined'.
Type '() => void' is not assignable to type 'string | ReadEntry | undefined'.
ERROR in /node_modules/.pnpm/tar@7.2.0/node_modules/tar/dist/commonjs/pack.d.ts
71:4-9
[tsl] ERROR in /home/user/next.js/node_modules/.pnpm/tar@7.2.0/node_modules/tar/dist/commonjs/pack.d.ts(71,5)
TS2416: Property 'write' in type 'Pack' is not assignable to the same property in base type 'Minipass<ContiguousData, Buffer, WarnEvent>'.
Type '(path: string | ReadEntry) => boolean' is not assignable to type '{ (chunk: Buffer, cb?: (() => void) | undefined): boolean; (chunk: Buffer, encoding?: Encoding | undefined, cb?: (() => void) | undefined): boolean; }'.
Types of parameters 'path' and 'chunk' are incompatible.
Type 'Buffer' is not assignable to type 'string | ReadEntry'.
Type 'Buffer' is missing the following properties from type 'ReadEntry': #private, header, startBlockSize, blockRemain, and 75 more.
I have the same problem with the version tar@7.2, @types/node@20.14.2 and typescript@5.3.3.
How can I fix it?
Same here, typescript @5.5.3, @types/node@20.14.9, and tar@7.4.0.
Reproduction case, please. This works fine for me.
Actually, no, this issue is for tar 7.1, minipass 5, and @types/node v18.
@stephematician @pamelalozano16 Whatever problems you're having, they're not this issue, even if the error looks similar. Open a new issue with full detailed steps to reproduce what you are seeing, and I will gladly take a look.