Gulp v4: Task function must be specified

I’m facing gulp 4 issue Task function must be specified

Node version: 12.9.1
NPM: 6.10.3
(unfortunately, I cannot degrade node)

My gulpfile.js

var gulp = require('gulp');
var sass = require('gulp-sass');
var cleanCss = require('gulp-clean-css');
var rename = require('gulp-rename');

var paths = {
  sass: ['./scss/**/*.scss']
};

gulp.task('default', ['sass']);

gulp.task('sass', function(done) {
  gulp.src('./scss/ionic.app.scss')
    .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest('./www/css/'))
    .pipe(cleanCss({
      keepSpecialComments: 0
    }))
    .pipe(rename({ extname: '.min.css' }))
    .pipe(gulp.dest('./www/css/'))
    .on('end', done);
});

gulp.task('watch', ['sass'], function() {
  gulp.watch(paths.sass, ['sass']);
});

my package.json

        ...
        "gulp": "^4.0.2",
        "gulp-clean-css": "^4.2.0",
        "gulp-rename": "^1.4.0",
        "gulp-sass": "^4.0.2",
        ...

Does anyone has updated gulp.js for ionic 1 & node 12+ ?
(Meanwhile, I’m looking into the migration of gulpfile.js to v4 syntax)

I’m having the same problem, any news?

Unfortunately, there is no quick fix, we need to read a little about the change of syntax between version 3 and 4 of gulp, however, this article I share with you has helped me a lot.

https://codeburst.io/switching-to-gulp-4-0-271ae63530c0

Did you find a solution for this? I am having the same issue with Node 14.5/Gulp 3 and am wondering if I should just downgrade to Node11 or if there is a working solution for Node12+/Gulp 4. What gulp dependencies need upgrading to. I would rather not mess with gulpfile.js but I think I am going to have to if I move things to gulp 4.

I read somewhere, can’t recall where, that there is a dependency gulp wrapper that allows your gulpfile.js to be backward compatiable with gulp3 after the upgrade. At least thats what I think I read.