Open nerijusgood opened 8 years ago
I'm having a similar problem using gulp-postcss
, gulp-plumber
, and gulp-watch
together — task shown below. When the task encounters a CSS error, the task remains open and the error is logged per the warn
error handler passed in, so all is good so far. But the build files aren't updated with any changes made to the source files, like fixing the error.
gulp-watch
does still continue to log that changes were detected in the source files; they just don't get processed anymore unless I restart the task over again.
gulp.task('styles', function() {
gulp.src($.css.globs)
.pipe(watch($.css.watch, {name: 'styles', verbose: true}))
.pipe(plumber(warn))
.pipe(postcss(parts))
.pipe(gulp.dest($.css.dest));
});
Has anyone found a solution/workaround for this yet?
I have the same issue.
I have this problem, but nobody resolved it as I see...
Bad fix:
Will work with gulp-notify
https://www.npmjs.com/package/gulp-notify
import notify from 'gulp-notify';
and
Instead .pipe(plumber())
insert .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
I don't know why it works, I found it when I wanted to delete gulp-notify
, he has his own problems (with notifications).
Just notice the same. Solutions?
Gulp task:
Whenever there is an error, like importing file that does not exist (wrong path), I get this error which stops gulp:
Really annoying causing me to restart my tasks every time css error is made. Am I doing something wrong?