Jordan Baron
Jordan Baron

Reputation: 4180

Gulp did you forget to signal async completion

I keep getting Did you forget to signal async completion? when running gulp on my project. I updated my code to work for Gulp 4 but I am still getting an error.

function done() {
    console.log("Finished");
}

gulp.task('default', gulp.series(gulp.parallel(['message', 'copyHtml', 'imageMin', 'scripts'])), function() {
    done();
});

Upvotes: 1

Views: 2773

Answers (1)

TheDancingCode
TheDancingCode

Reputation: 942

Normally gulp mentions which task did not complete, but I'm guessing it's your done function. 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));

Upvotes: 2

Related Questions