Answer the question
In order to leave comments, you need to log in
How to handle errors in Gulp?
Hello,
Can you please tell me how to make gulp-watch not fall off in case of an error (for example, when compiling LESS), but continue to work?
For error handling I use gulp-plumber:
gulp.task('less', function() {
return gulp.src(sourceDir + '/less/style.less')
.pipe(plumber())
.pipe(less())
.pipe(gulp.dest(destDir + '/css'));
});
Answer the question
In order to leave comments, you need to log in
I had the same issue. Need to remove return
gulp.task('less', function() {
gulp.src(sourceDir + '/less/style.less')
.pipe(plumber())
.pipe(less())
.pipe(gulp.dest(destDir + '/css'));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question