Gulp error: Did you forget to signal async completion?

First of all: do check the Gulp documentation on this: https://gulpjs.com/docs/en/getting-started/async-completion#using-async-await

I had the following gulpfile.js:

# file gulpfile.js
function build() {
    return series(
        clean,
        parallel(
            images,
            tracker,
            fonts
        ),
        clean_busters
    );
}

exports.build = build;

When running gulp build I got the following errors:

$ gulp build
[11:17:33] Using gulpfile ./gulpfile.js
[11:17:46] The following tasks did not complete: build
[11:17:46] Did you forget to signal async completion?

Solution

I fixed it by making the build() function async: async build().
Then my gulpfile.js looked like the following (note the extra parentheses at the end!)

# file gulpfile.js
async function build() {
    return series(
        clean,
        parallel(
            images,
            tracker,
            fonts
        ),
        clean_busters
    )();
}

exports.build = build;
0 Shares
>