我怎样才能解决这个错误“下面的任务没有完成:默认情况下,你忘了信号异步完成? “
这是我的gulpfile.js
const gulp = require('gulp');
gulp.task('default', function () {
});
我写gulp
在我的终端和应对..
[19:47:02] Using gulpfile D:\DEV64\LearningJS\gulpfile.js
[19:47:02] Starting 'default'...
[19:47:02] The following tasks did not complete: default
[19:47:02] Did you forget to signal async completion?
我能做什么?
回答如下:在咕嘟咕嘟3.X,你并不需要完成信号。但是,从咕嘟咕嘟4.x中你需要做的。
咕嘟咕嘟自动传递的回调函数,你的任务作为第一个参数。你的情况简单的方法是调用回调。
gulp.task('default', function(done) {
console.log("Started");
done();
});
欲了解更多信息,您可以检查这个问题了:Gulp error: The following tasks did not complete: Did you forget to signal async completion?