I always have the same error when installing gulp:
C:\Users\Thomas\Desktop\Sites CT Graphics\colpaertmarc.be>gulp
assert.js:350
throw err;
^
AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\Users\Thomas\Desktop\Sites CT Graphics\colpaertmarc.be\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (C:\Users\Thomas\Desktop\Sites CT Graphics\colpaertmarc.be\node_modules\undertaker\lib\task.js:13:8) at Object. (C:\Users\Thomas\Desktop\Sites CT Graphics\colpaertmarc.be\gulpfile.js:19:6) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18)
This error occurs after you upgrade your gulp version from 3.* to 4.*. If you don't want to downgrade gulp, then you will have to rewrite gulp tasks to be valid with v4 api. Here is example how to rewrite simple gulp task from api notation used in v3 to notation compatiable with v4.
var gulp = require('gulp');
// Deleting resources task
gulp.task('clearResources', function() {
console.log('Deleting resources');
});
// Default gulp task
gulp.task('default', ['clearResources'], function() {
console.log('Running default task');
});
var gulp = require('gulp');
// Delete resources function
function clearResources() {
console.log('Deleting resources');
};
// Gulp task(s)
exports.clear = clearResources;
exports.default = gulp.series(clearResources);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With