1

I've tried to migrate from gulp v3 to v4, but when I write 'gulp build' I get such error

D:\Projects\Exo\exo\src\COG.SRM\node_modules\undertaker\lib\set-task.js:10 assert(typeof fn === 'function', 'Task function must be specified');
^ AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (D:\Projects\Exo\exo\src\COG.SRM\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (D:\Projects\Exo\exo\src\COG.SRM\node_modules\undertaker\lib\task.js:13:8) at Object. (D:\Projects\Exo\exo\src\COG.SRM\gulpfile.js:341:6) at Module._compile (internal/modules/cjs/loader.js:936:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10) at Module.load (internal/modules/cjs/loader.js:790:32) at Function.Module._load (internal/modules/cjs/loader.js:703:12) at Module.require (internal/modules/cjs/loader.js:830:19) at require (internal/modules/cjs/helpers.js:68:18) at execute (C:\Users\SS\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:36:18)

According to my researches, I should change my gulpfile.js file.

Could someone help me please how to change such commands according to the new version of gulp:

gulp.task('clean-css', function (cb) {
    return rimraf(paths.css, cb);
});

gulp.task('clean', ['clean-css', 'clean-fonts', 'clean-js']);

gulp.task('build-css', ['lint-css'], function () {});
justDan
  • 2,302
  • 5
  • 20
  • 29
Taras
  • 45
  • 4

0 Answers0