question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gulp 4 task: "Did you forget to signal async completion?"

See original GitHub issue

Setup

λ gulp -v
[10:52:08] CLI version 1.0.0
[10:52:08] Local version 4.0.0-alpha.2

del v2.1.0 Windows 7

Tasks

var del = require('del');
function clean() {
    return del(['docs', 'coverage', 'build', 'release']);
}

function build() {
    return gulp.series(
        clean
    );
}

gulp.task(build);

Error

λ gulp build
[10:52:22] Using gulpfile C:\project\gulpfile.js
[10:52:22] Starting 'build'...
[10:52:22] The following tasks did not complete: build
[10:52:22] Did you forget to signal async completion?

Am I missing something?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:12
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

43reactions
quoniammmcommented, Apr 28, 2016

My suggestion is:

var del = require('del');
function clean(cb) {
    del(['docs', 'coverage', 'build', 'release']);
    cb();
}

gulp.task('build', gulp.series(clean));
41reactions
AquilaSagittacommented, Jul 3, 2018

I did this to solve the issue. Idk why it works it just works

export const build = (done) => {
    gulp.series(clean, gulp.parallel(styles, scripts))(done);
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp error: The following tasks did not complete - Stack Overflow
Since your task might contain asynchronous code you have to signal gulp when your task has finished executing (= "async completion").
Read more >
Async Completion - gulp.js
Signal task completion #. When a stream, promise, event emitter, child process, or observable is returned from a task, the success or error...
Read more >
How to fix: Gulp - tasks did not complete ... you forget to signal ...
Synchronous functions are executed one after another, and each function must wait for the previous one to complete before they start themselves.
Read more >
Gulp error: Did you forget to signal async completion?
Gulp error: Did you forget to signal async completion? ... I had the following gulpfile.js : # file gulpfile.js function build() { return...
Read more >
Gulp error - Did you forget to signal async completion?
In Gulp 3.x you could get away without doing this. If you didn't explicitly signal async completion gulp would just assume that your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found