[英]Gulp did you forget to signal async completion
I keep getting Did you forget to signal async completion?
我不断收到消息
Did you forget to signal async completion?
when running gulp
on my project. 在我的项目上运行
gulp
时。 I updated my code to work for Gulp 4 but I am still getting an error. 我更新了代码以适用于Gulp 4,但是仍然出现错误。
function done() {
console.log("Finished");
}
gulp.task('default', gulp.series(gulp.parallel(['message', 'copyHtml', 'imageMin', 'scripts'])), function() {
done();
});
Normally gulp mentions which task did not complete, but I'm guessing it's your done
function. 通常,gulp会提到哪个任务没有完成,但是我猜这是您
done
功能。 Update it as follows: 如下更新:
function done(cb) {
console.log("Finished");
cb();
}
You'll also need to change the way the function is invoked: 您还需要更改该函数的调用方式:
gulp.task('default', gulp.series(gulp.parallel('message', 'copyHtml', 'imageMin', 'scripts'), done));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.