gulp.task('cssmin', async() => {
gulp.src(['./src/css/*.less', './src/css/*.css'])
.pipe(less())
.pipe(csso())
.pipe(gulp.dest('./dist/css'));
});
There are also hints in the error message:
The following tasks did not complete: default, < anonymous>
Did you forget to signal async completion?
Build the global task call to report an error, such as:
PS C:\Users\J\Desktop\demo\gulp-demo> Gulp assert. Js: 385
throw err;
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at gulp. set [as _setTask] (C: Users\J\node_modules\ lib\set-task.js:10:3)
at gulp. Task (C: \ Users \ \ J node_modules \ undertaker \ lib \ task js: 8)
the at Object. & lt; anonymous> (C: \ Users \ \ Desktop \ demo \ J gulp – demo \ gulpfile js: 60:6)
at the Module. The _compile (internal/modules/CJS/loader. Js: 1176:30)
at the Object. The Module. _extensions.. Js (internal/modules/CJS/loader. Js: 1196:10)
at the Module. The load (internal/modules/CJS/loader. Js: 1040:32)
at the Function, the Module. _load (internal/modules/CJS/loader. Js: 929:14)
the at The Module. The require (internal/modules/CJS/loader. Js: 1080:19)
at the require (internal/modules/CJS/helpers. Js: 72:18)
at the execute (C:\Users\J\AppData\ NPM \node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:36:18) {
generatedMessage: false,
code: ‘ERR_ASSERTION’,
actual: false,
expected: True,
operator: ‘= =’
}
Simply prefix the function name of the call with Gulp.Series
gulp.task('default', gulp.series(['htmlmin', 'cssmin', 'jsmin', 'copy', async(done) => done]))
div>
Read More:
- Gulp Error: Cannot find module ‘jshint/src/cli’;
- Cannot find module ‘internal / util / types’ appears during gulp build
- error C4996: ‘scanf‘: This function or variable may be unsafe.Visual Studio Series compilers report errors using scanf function
- Error reported by gulp: referenceerror: primordials is not defined
- Gulp failed to run
- Hive execution task report cannot find main class error
- Using webpack to report typeerror: this.getresolve is not a function
- Quarz timing task does not execute and does not report error
- Vue — report error with less module build failed: typeerror: loaderContext.getResolve is not a function
- Vue report failed to mount component: template or render function not defined
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- [C + +] C + + overload operator = must be a nonstatic member function?
- error: Type of the default value for ‘tableData‘ prop must be a function
- Tensorflow image random_ There seems to be something wrong with the shift function
- #error identifier-list parameters may only be used in a function definition
- cas report error (No subject,’principal’ cannot be null, PKIX path validation failed, etc.)
- Spring AOP uses AspectJ to report an exception that ‘the reference to the bean “mypointcut” cannot be resolved’
- When generating a test report in HTML format, report [typeerror: a bytes like object is required, not ‘STR’]
- Report error when using microwave “must either be declared abstract” abstract method “getWXPayDomain()” in WXPayConfig
- Solve the problem of Vue running error( process.env.NODE_ Env = =’production ‘) and error in plugin “gulp shell”“