简体   繁体   English

Gulp错误:您是否忘记了异步完成信号?

[英]Gulp error: Did you forget to signal async completion?

Problems with compiling what I see as a simple script using gulp. 使用gulp编译简单脚本时出现问题。 When ran it causes a "Did you forget to signal async completion?" 运行时会导致“您是否忘记了异步完成信号?” error. 错误。

Looking at the internet this seems to be a problem with async functions and read that passing and adding the done function would resolve this. 在互联网上看,这似乎是异步函数的问题,并且读到传递和添加完成函数将解决此问题。 In my case this isn't the case so wondering what else I'm doing wrong. 在我的情况下不是这样,所以想知道我在做什么错。

gulp.task("compile-less", done => {
  gulp
    .src("./app/design/frontend/Playsports/theme_frontend_base/web/css/_base.less")
    .pipe(less())
    .pipe(
      gulp.dest(() => {
        return "./pub/static/frontend/Playsports/gcn/en_GB/css/";
      })
    );
  done();
});

gulp.task("default", done => {
  gulp.series("compile-less");
  done();
});

I would expect this to not error and complete the task. 我希望这不会出错并完成任务。

This would be the general form: 这将是一般形式:

gulp.task("default", gulp.series("compile-less", done => {
  // do something else here
  done();
}));

In your case I believe this is sufficient: 在您的情况下,我认为这已足够:

gulp.task("default", gulp.series("compile-less"));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gulp您是否忘记了异步完成信号 - Gulp did you forget to signal async completion Gulp:您是否忘记发出异步完成错误信号 - Gulp: Did you forget to signal async completion error 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 我如何解决此错误'以下任务未完成:默认,您是否忘记了异步完成信号? ' - 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.? Gulp 4 Sass忘记信号异步完成 - Gulp 4 sass forget to signal async completion gulpjs - “您是否忘记发出异步完成信号?” 从 uglifyjs 切换到 terser 之后 - gulpjs - "Did you forget to signal async completion?" after switching from uglifyjs to terser Gulp 4.0信号异步完成错误,尽管返回了流 - Gulp 4.0 signal async completion error despite returning stream
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM