Keep gulp running with Plumber - zhentian-wan/MEANAppsFiles GitHub Wiki

Prevent pipe breaking caused by errors from gulp plugins.

Install:

npm install --save-dev gulp-plumber

Using:

gulp.task('js', function() {
    return gulp.src('./server.js')
        .pipe(plumber())
        .pipe(browserify({debug: gutil.env.development}))
        .pipe(gutil.env.production ? uglify() : gutil.noop())
        .pipe(gulp.dest('./build'));
});

Put pipe(plumber()) to where you think might cause error.