Answer the question
In order to leave comments, you need to log in
Why is gulp watch not starting?
var gulp = require('gulp'),
sass = require('gulp-sass'),
watch = require('gulp-watch');
gulp.task('sass', function() {
return gulp.src('app/scss/**/*.scss')
.pipe(sass())
.pipe(gulp.dest('app/css'));
});
gulp.task('watch', function() {
gulp.watch('app/scss/**/*.scss', ['sass']);
});
Answer the question
In order to leave comments, you need to log in
It looks like you are using Gulp 4.
In that case, you misspelled the "watch" task.
Replace
gulp.task('watch', function() {
gulp.watch('app/scss/**/*.scss', ['sass']);
});
gulp.task('watch', function() {
gulp.watch('app/scss/**/*.scss', gulp.parallel('sass'));
});
gulp.task('watch', function() {
gulp.watch('app/scss/**/*.scss', gulp.series('sass'));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question