Closed marekdedic closed 4 months ago
Seems like this has nothing to do with merge-stream if it works in some of your Gulp 5 projects and not others. Could you try creating a minimal reproduction?
P.S. - does the destination .well-known
directory in your sample code exist and/or need to be created?
Minimal repro: https://gist.github.com/marekdedic/ba636b4fcbf233d65a63b8c1720b057d
Run npm ci && gulp main
to see the issue.
In the original code, the dist/.well-known
folder needs to be created.
This is not an issue with merge stream.
I am receiving the same error when updating to gulp 5.0 The fix for me was to move 1 of my 4 file copy out of merge and run it normally. It was specifically the first one not sure why it runs differently from the other 3 other than specifically what it's copying or how it works based on what it's copying. Hope this helps someone.
Having the same issue here, after upgrading to Gulp 5.
I have a number of gulp.src(...).pipe(...)
in a mergeStream()
.
I was trying to do one by one, and then in one big gulp.src([....])
, I was trying file by file, in that array.
It seems that no matter what, if there are 3 items in that src array, it's enough to start triggering this crash. Seems a bit random, but "consistently", as in as soon as I make it crash, it always crashes.
Definitely something related to mergeStream()
, as otherwise, they never fail if outside a merged stream.
I might just have to separate all the streams into a big series of many functions, as mergeStream()
no longer seems to work well with Gulp 5.
EDIT - Ah.. just found this - https://github.com/gulpjs/gulp/issues/2802
The merge-stream package is no longer supported, as it isn't a properly behaving stream. You can instead use the ordered-read-stream package that the gulpjs team maintains, which has the same interface/usage as merge-stream.
Yes, my solution was to switch to ordered-read-stream as well, recommend to anyone migrating to gulp 5.
I'm glad to hear there's an easy solution.
I don't know for sure if anybody else depends on the {end: false}
behavior and I'm not particularly inclined to find out by changing it.
Thanks.
Yeah, it worked for me, by just changing:
const mergeStream = require('merge-stream');
to:
const mergeStream = require('ordered-read-streams');
(and installing ordered-read-streams
, of course)
Hi, I recently tried to update to gulp v5 across multiple repositories using
merge-stream
. In most of them, it worked just fine, but I am hitting an issue in scout-handbook/odymaterialy.skauting.cz#12. When I do e.g.gulp copy:local
, it runs the following code:And I get: