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();
} );

 

posted @ 2019-01-20 12:20  秦时明月NightTiger  阅读(4264)  评论(0编辑  收藏  举报