简体   繁体   English

Gulp您是否忘记了异步完成信号

[英]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.

相关问题 Gulp:您是否忘记发出异步完成错误信号 - Gulp: Did you forget to signal async completion error Gulp错误:您是否忘记了异步完成信号? - Gulp error: Did you forget to signal async completion? Gulp 4迁移错误(您是否忘记发信号异步完成?) - Gulp 4 Migration Errors (Did you forget to signal async completion?) Gulp 错误:“以下任务未完成;您是否忘记发出异步完成信号” - Gulp Error: "The following tasks did not complete; Did you forget to signal async completion" Gulp4 - 任务没有完成,忘记发信号异步完成 - Gulp4 - tasks did not complete and forget to signal async completion Gulp 4 Sass忘记信号异步完成 - Gulp 4 sass forget to signal async completion 我如何解决此错误'以下任务未完成:默认,您是否忘记了异步完成信号? ' - how can i solve this error 'The following tasks did not complete: default, Did you forget to signal async completion? ' Gulp 抛出错误。 您是否忘记发出异步编译信号。? - Gulp is throwing an error. Did you forget to signal async compilation.? gulpjs - “您是否忘记发出异步完成信号?” 从 uglifyjs 切换到 terser 之后 - gulpjs - "Did you forget to signal async completion?" after switching from uglifyjs to terser 使用Gulp,Babel和config.yml信号异步完成 - Signal async completion with Gulp, Babel and config.yml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM