Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-plumber with all npm packages installed. Try it out:

var gulpPlumber = require("gulp-plumber")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-plumber v1.2.0

Prevent pipe breaking caused by errors from gulp plugins

:monkey: gulp-plumber

NPM version Build Status Dependency Status

Prevent pipe breaking caused by errors from gulp plugins

This :monkey:-patch plugin is fixing issue with Node Streams piping. For explanations, read this small article.

Briefly it replaces pipe method and removes standard onerror handler on error event, which unpipes streams on error by default.

Usage :monkey:

First, install gulp-plumber as a development dependency:

npm install --save-dev gulp-plumber

Then, add it to your gulpfile.js:

var plumber = require('gulp-plumber');
var coffee = require('gulp-coffee');


API :monkey:

:monkey: plumber([options])

Returns Stream, that fixes pipe methods on Streams that are next in pipeline.


Type: Object / Function Default: {}

Sets options described below from its properties. If type is Function it will be set as errorHandler.


Type: Boolean Default: true

Monkeypatch pipe functions in underlying streams in pipeline.


Type: Boolean / Function
Default: true

Handle errors in underlying streams and output them to console.

  • function - it will be attached to stream on('error').
  • false - error handler will not be attached.
  • true - default error handler will be attached.


This method will return default behaviour for pipeline after it was piped.

var plumber = require('gulp-plumber');


License :monkey:

MIT License

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free