-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi. I having trouble running unzip.
I have a task in Gulp that when run unzips .zip files containing a series of binary and text files and puts them in a directory. My task is as follows:
// gulpfile.js
const gulp = require( 'gulp' );
const unzip = require( 'gulp-unzip' );
gulp.task( 'mytask', () => {
return (
gulp.src( './my_dir/*.zip' )
.pipe( unzip() )
.pipe( gulp.dest( './out/' ) )
);
} );
When I run this test code it gives me the following error in the console:
PS D:\GLang> gulp mytask
[16:41:34] Using gulpfile D:\GLang\gulpfile.js
[16:41:34] Starting 'mytask'...
[16:41:35] Finished 'mytask' after 13 ms
node:events:502
throw er; // Unhandled 'error' event
^
<ref *1> Error: FILE_ENDED
at Parse.pull (D:\GLang\node_modules\unzipper\lib\PullStream.js:80:28)
at Parse.emit (node:events:524:28)
at Parse.emit (node:domain:552:15)
at Parse.<anonymous> (D:\GLang\node_modules\unzipper\lib\PullStream.js:20:10)
at Parse.emit (node:events:536:35)
at Parse.emit (node:domain:552:15)
at finish (node:internal/streams/writable:955:10)
at node:internal/streams/writable:936:13
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on Domain instance at:
at Parse.emit (node:domain:540:12)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
domainEmitter: Parse {
_opts: { verbose: false },
_events: {
close: [Function: bound afterTransform],
error: undefined,
prefinish: undefined,
finish: [ [Function (anonymous)], [Function (anonymous)] ],
drain: undefined,
data: undefined,
end: undefined,
readable: undefined,
chunk: undefined,
unpipe: undefined,
entry: [Function (anonymous)]
},
_readableState: ReadableState {
highWaterMark: 16,
buffer: [],
bufferIndex: 0,
length: 0,
pipes: [],
awaitDrainWriters: null,
[Symbol(kState)]: 1053119,
[Symbol(kErroredValue)]: [Circular *1]
},
_writableState: WritableState {
highWaterMark: 16,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 1091450303,
[Symbol(kBufferedValue)]: null,
[Symbol(kWriteCbValue)]: null,
[Symbol(kErroredValue)]: [Circular *1]
},
allowHalfOpen: true,
_maxListeners: undefined,
buffer: Buffer(0) [Uint8Array] [],
_eventsCount: 3,
cb: undefined,
finished: true,
__ended: true,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
domainThrown: false
}
Node.js v22.13.1
My development environment is as follows:
OS: Windows 10
CPU Arch: x64
Node version: v22.13.1
NPM version: 10.9.2
unzip version: ^1.1.0
I think problem seems to be with the unzipper package.
Thank you for helping me.
Metadata
Metadata
Assignees
Labels
No labels