A Gulp plugin that prevents pipe breaking when errors occur in Gulp plugin streams.
gulp-plumber is a Gulp plugin that prevents pipe breaking caused by errors in Gulp plugin streams. It fixes a known issue in Node.js streams where errors automatically unpipes streams, halting the entire build process. By replacing the `pipe` method and removing the default error handler, it ensures errors are handled without interrupting the pipeline.
Gulp users and developers working with build pipelines who need to maintain continuous workflow despite errors in plugin streams.
Developers choose gulp-plumber because it provides a simple, effective solution to a common pain point in Gulp workflows, allowing errors to be logged or handled without stopping the entire build process.
Fixing Node pipes
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces the `pipe` method and removes the default `onerror` handler, fixing Node.js stream issues that cause unpiping on errors, as explained in the README and linked article.
Allows attaching custom error handlers via the `errorHandler` option, enabling developers to log or manage errors without stopping the build, with support for functions, true, or false settings.
Provides a `stop()` method to restore default pipeline behavior after specific tasks, offering fine-grained control over where error prevention is applied, as shown in the API examples.
Optional `inherit` option monkeypatches `pipe` functions in underlying streams, ensuring error prevention propagates through the entire pipeline, as detailed in the options.
Patches Node.js stream methods, which the README admits is a ':monkey:-patch,' making it brittle and prone to conflicts with other plugins or Node.js updates.
By preventing pipeline breaks, it can hide errors that should cause immediate failures, potentially delaying debugging in complex workflows where strict error handling is needed.
Limited to Gulp-based projects and doesn't integrate with modern build tools, reducing its relevance for teams transitioning to alternatives like npm scripts or Webpack.
Must be explicitly piped into each task chain, adding verbosity and complexity compared to global error handling solutions or built-in Gulp features.