V
V
vczxcdvzxc2021-11-05 13:11:42
gulp.js
vczxcdvzxc, 2021-11-05 13:11:42

Gulp fails with error Task never defined: default?

var gulp = require('gulp'),
  sass = require('gulp-sass')(require('sass')),
  watch = require('gulp-watch');

gulp.task('sass', function() {
  return gulp.src('./scss/**/*.scss')
  .pipe(sass({outputStyle: 'compressed'}))
  .pipe(gulp.dest('./css'));
});  

gulp.task('watch', function() {
  gulp.watch('./scss/**/*.scss', gulp.series('sass'));
});


Here is my gulpfile.js code - gulp doesn't work - throws an error

And + I would like watcher to work normally and not run watch separately - and it doesn't track changes at all!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-11-05
@delphinpro

and to translate the text of an error in general in any way?
They write in black and white - the task is not defined.
Where in your file gulp.task('default' , ....)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question