Whenever I open gulp, I encounter an error related to minifying css and js files using gulp tasks. Despite my efforts to find a solution, the problem remains unresolved.
Error Message: assert.js:374 throw err; ^ AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (c:\wamp64\www\gulp_p\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (c:\wamp64\www\gulp_p\node_modules\undertaker\lib\task.js:13:8) at Object. (c:\wamp64\www\gulp_p\gulpfile.js:64:6) at Module._compile (internal/modules/cjs/loader.js:956:30) ...
My Installation Details:
gulp --version => CLI version: 2.2.0 - Local version: 4.0.2
node --version => v12.13.0
npm --version => 6.12.0
npx --version => 6.12.0
Package.json Configuration:
{
"name": "gulp_p",
"version": "1.0.0",
"main": "gulpfile.js",
"dependencies": {
"gulp": "^4.0.2",
...
},
"devDependencies": {},
...
}
Gulpfiles.js Confirmation: The gulpfile.js seems to work fine on another computer without any errors as it is located in the project's root directory.
'use strict';
var gulp = require('gulp');
...
gulp.task('css', function() {...});
gulp.task('scripts', function() {...});
gulp.task('choose', function(){...});
gulp.task('default',['choose','css','scripts']);