javascript - Gulp plumber cannot pipe to undefined -



javascript - Gulp plumber cannot pipe to undefined -

i trying, write module when gulp watching task, , less file changed error, should give message console, should not crash system, no: code have written:

var onerror = function (err) { console.log(err); }; gulp.task('styles', function () { gulp.src('./{views}/**/*.{less}') .pipe(plumber({ errorhandler: onerror })) .pipe(less()) .pipe(gulp.dest('build/styles/common.css')); });

when run above code, error below:

'styles' errored after 20 ms error in plugin 'plumber' message: can't pipe undefined

yes have installed gulp-less, , figured out solution problem aswell: should follow:

gulp.task('mystyle', function () { gulp.src('build/stylesfiles.less').pipe(plumber()).pipe(less()). pipe(gulp.dest ('build/styles/assets')); });

basically not need error message, give me default error, can job done.using above code create sure runs, , gives me error, not crash server....but give thanks "apercu"

javascript node.js gulp gulp-watch gulp-less

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -