二、gulp报错The following tasks did not complete

gulp4.0 presence of an error message The following tasks did not complete: default, Did you forget to signal async completion?

When the time code gulp as follows:

//   The following code will be executed under the node environment 
const gulp = The require ( " gulp " );

 //   create a task gulp of 
gulp.task ( " default " , function () { 
    console.log ( " gulp default Task " ); 
});

operation result:

The following tasks did not complete: default
Did you forget to signal async completion?

Solution:

//   The following code will be executed under the node environment 
const gulp = The require ( " gulp " );

 //   create a task gulp of 
gulp.task ( " default " , function (DONE) { 
    console.log ( " gulp default Task " ) ; 
    DONE (); 
});

 

Guess you like

Origin www.cnblogs.com/fger/p/12572723.html