grncdr / merge-stream

Merge multiple streams into one interleaved stream
MIT License
214 stars 16 forks source link

Fail on a watch task #18

Closed amio closed 9 years ago

amio commented 9 years ago

It works well as a standalone task, but fail on a watch task:

[15:15:26] Starting 'parallel'...
[15:15:26] Starting 'scripts'...
[15:15:26] 'scripts' errored after 152 ms
[15:15:26] Error: write after end
    at writeAfterEnd (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/merge-stream/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:144:12)
    at DestroyableTransform.Writable.write (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/merge-stream/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:192:5)
    at DestroyableTransform.ondata (stream.js:51:26)
    at DestroyableTransform.emit (events.js:107:17)
    at DestroyableTransform.<anonymous> (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
    at DestroyableTransform.emit (events.js:104:17)
    at emitReadable_ (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
    at emitReadable (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
    at readableAddChunk (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
    at DestroyableTransform.Readable.push (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
[15:15:26] 'parallel' errored after 154 ms
[15:15:26] Error: write after end
    at writeAfterEnd (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/merge-stream/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:144:12)
    at DestroyableTransform.Writable.write (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/merge-stream/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:192:5)
    at DestroyableTransform.ondata (stream.js:51:26)
    at DestroyableTransform.emit (events.js:107:17)
    at DestroyableTransform.<anonymous> (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
    at DestroyableTransform.emit (events.js:104:17)
    at emitReadable_ (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
    at emitReadable (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
    at readableAddChunk (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
    at DestroyableTransform.Readable.push (/Users/wuasahi/git/haojing/htdocs/assets/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)

here's my watch task(FYI, I'm using gulp 4.0):

        gulp.watch(['./app/**/*.js', './lib/**/*.js'],
            gulp.parallel('scripts'));
stevemao commented 9 years ago

This is not emitted from this module

stevemao commented 9 years ago

Closing as I don't think this is a problem of this module. If you disagree, send a pr with failing test to clarify the problem.

amio commented 9 years ago

Sure, since I have used some other way to compose tasks, so I've lost the context it occured. If I met the problem again I'll make a failing test.

finally, thanks.

lukasoppermann commented 7 years ago

I run into the same issue @amio how did you solve this? Any way I can figure out where the problem comes from?

amio commented 7 years ago

@lukasoppermann sorry I forgot the details =. =