使用gulp在有的教程中创建一个任务要这么写:
gulp.task('default',()=>{ console.log("HTTP Server Started"); })
但是会报错提示
[10:44:30] The following tasks did not complete: default
[10:44:30] Did you forget to signal async completion?
所以说gulp的任务需要加入异步修饰符,要有如下写法:
gulp.task('default',async()=>{ console.log("HTTP Server Started"); })
或
gulp.task('default', () => { return new Promise(function(resolve, reject) { console.log("HTTP Server Started"); resolve(); }); });
问题解决