Continue gulp on error?
See original GitHub issueI have the following gulp js code using the gulp-coffee plugin:
gulp.src('./**/*.coffee')
.pipe(coffee({bare: true}))
.on('error', gutil.log)
.on('error', gutil.beep)
.pipe(gulp.dest(destDir));
Whenever gulp-coffee throws an error (e.g. invalid coffee syntax), it stops the rest of valid coffee files from ‘piping’ through; even though the error is caught.
To clarify this, here is a sample file queued via gulp.src
:
A.coffee (processed)
B.coffee (error and stops the rest of the stream)
C.coffee (not processed)
Is there a way to ‘continue’ the stream?
Issue Analytics
- State:
- Created 10 years ago
- Comments:42 (39 by maintainers)
Top Results From Across the Web
node.js - Gulp image-min - How to continue after an error?
I have tried to capture the error and continue, but its not working once it hits a corrupted image the task then aborts....
Read more >Async Completion - gulp.js
When a stream, promise, event emitter, child process, or observable is returned from a task, the success or error informs gulp whether to...
Read more >Catching errors on Gulp.js - Boris - Medium
The recommended way to notify about occurred errors in gulp plugins is an emitting `error` event. But node.js streams, which are actually ...
Read more >[L5.3] Webpack Doesn't Continue on gulp watch After Error
Hi,. While on the gulp watch, once webpack doesn't do its job subsequent modification once it encounters error on script. I have exit...
Read more >Errors: Call the Plumber > Gulp! Refreshment ... - SymfonyCasts
Out of the box, Gulp supports error handlers where you say "Hey, instead of exploding all crazy, just call this function over here....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Isn’t
--continue
supposed to do this? It doesn’t, but isn’t it supposed to?@Contra I put together a testbed at: https://github.com/Dashed/gulp-coffee-sandbox to demonstrate the issue.
Just
npm install
andgulp
.There are four coffeescript files:
The file
b.coffee
contains invalid coffeescript. Onlyc.coffee
would not get compiled.