question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you handle errors in broken stream?

See original GitHub issue

I’m trying to use plumber to handle the errors. If compilation fails during watch, plumber keeps the pipe together, but webpack watch zombies out.

var gulp = require('gulp');
var webpack = require('webpack-stream');
var path = require('path');
var plumber = require('gulp-plumber');

gulp.task('webpack-client', function() {
    return gulp.src(path.join('app/rehydrate'))
        .pipe(plumber())
        .pipe(webpack( require(path.join('../..', 'webpack.config.js'))[0] ))
        .pipe(gulp.dest(path.join('public/dist')));
});

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
sinediedcommented, May 18, 2016

Has someone finally found a workaround to this issue, other than @iliakan solution to use webpack directly?

2reactions
phal0rcommented, Jan 9, 2016

Hi Guys,

I am using the following versions of the libs and can use plumber with default settings as outlined in the first comment in order to not break the stream and the webpack watch feature when a build error occurs:

“webpack”: “^1.12.9” “webpack-stream”: “^3.0.1” “gulp-plumber”: “^1.0.1”

So there is no need anymore for custom error handling

Update: The watch task is still doing its job and every time a new build is made, but after the first error the build will be corrupt, until i restart the whole gulp task, so it’s not working smooth yet 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling in Streams - Documentation - Akka
Recovering can be useful if you want to gracefully complete a stream on failure while letting downstream know that there was a failure....
Read more >
Spring WebFlux Broken Stream Error Handling - Stack Overflow
What is the recommended way to handle the error and notify the HTTP client that the stream terminated unexpectedly?
Read more >
Error Handling in Streams | Akka.NET Documentation
RecoverWithRetries allows you to put a new upstream in place of the failed one, recovering stream failures up to a specified maximum number...
Read more >
Errors in `webpack` break the pipe / task · Issue #34 - GitHub
It just stop watch and rerun pipe if it broken. I think webpack-stream should be not break pipe in watch mode. so above...
Read more >
Lambda Error Handling with Kinesis Streams - YouTube
Lambda Error Handling for streaming event sources such as Kinesis Data Streams, Kinesis Data Firehose, or DynamoDB Streams.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found