floatdrop / gulp-plumber

Fixing Node pipes
MIT License
806 stars 32 forks source link

Plumber busts task out of `gulp.watch` #29

Closed tomek-he-him closed 9 years ago

tomek-he-him commented 9 years ago

When using gulp.watch, here’s what happens:

$ gulp watch
[11:36:53] Starting 'scripts'...
[11:36:53] Finished 'scripts' after 197 ms
[11:36:53] Starting 'styles'...
[11:36:53] Plumber found unhandled error:
 Error in plugin 'gulp-less'
Message:
    Unrecognised input. Possibly missing something in ...
Details:
    ...
# Changed some files
[11:37:15] Starting 'scripts'...
[11:37:15] Finished 'scripts' after 179 ms
# Changed some files again
[11:39:10] Starting 'scripts'...
[11:39:10] Finished 'scripts' after 179 ms

After an error has been caught in scripts, the task is never resumed. Is this the intended behavior?

floatdrop commented 9 years ago

gulp.watch issues belongs here - https://github.com/gulpjs/gulp/issues

tomek-he-him commented 9 years ago

I thought it’s a problem with the way plumber handles these errors.

Anyway, thanks for the link – cheers!

floatdrop commented 9 years ago

@tomekwi oops, sorry, I thought that issue were in gulp-watch repo. Could you provide gulpfile to figure this out?

tomek-he-him commented 9 years ago

@floatdrop I followed your suggestion and tried to replace gulp.watch with gulp-watch – regarded as more robust. But the issue remains.

Our gulpfile is quite complex, but I remembering encountering the same with simple builds. I’ll try to reproduce the thing with a simpler build and post it here – I’ll be right back!

tomek-he-him commented 9 years ago

Hey, I’ve tried to reproduce the error, even written a more complex gulpfile for that: https://gist.github.com/tomekwi/0d1818c89b6453917a6c . But it doesn’t look bad after all.

My original project definitely has the issue, and it has been there for a long time already. But it looks like it lies somewhere else.

Sorry for the false alarm.

joepie91 commented 8 years ago

This should probably be reopened; specifically, it seems the issue is caused by this. A change to the default error handler should fix this, I think.

garygreen commented 8 years ago

@floatdrop I'm having the same problem. The article linked by @joepie91 fixed it -- could this be added to gulp plumber?