正文
gulp4.0 存在的错误信息 The following tasks did not complete: default,Did you forget to signal async completion?
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
当gulp为如下代码的时候:
// 以下代码会执行在node环境下
const gulp = require( "gulp" );// 创建一个gulp的任务
gulp.task( "default",function(){
console.log( "gulp default task" );
} );
运行结果:
The following tasks did not complete: default
Did you forget to signal async completion?
修改方法:
// 以下代码会执行在node环境下
const gulp = require( "gulp" );// 创建一个gulp的任务
gulp.task( "default",function(done){
console.log( "gulp default task" );
done();
} );