A
A
anriko2020-12-14 22:16:20
gulp.js
anriko, 2020-12-14 22:16:20

How to fix Task never defined: build error when migrating to galp 4?

gulp development
assert.js:341
    throw err;
    ^

AssertionError [ERR_ASSERTION]: Task never defined: build
    at getFunction (C:\rarus-test-master\node_modules\undertaker\lib\helpers\normalizeArgs.js:21:9)
    at map (C:\rarus-test-master\node_modules\arr-map\index.js:20:14)
    at normalizeArgs (C:\rarus-test-master\node_modules\undertaker\lib\helpers\normalizeArgs.js:30:10)
    at Gulp.series (C:\rarus-test-master\node_modules\undertaker\lib\series.js:13:14)
    at Object.<anonymous> (C:\rarus-test-master\gulpfile.js:119:26)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
PS C:\rarus-test-master>


how to correct if I have 2 tasks

export const development = gulp.series(
    gulp.parallel(
        stylesheets,
        js,
        image,
        html,
    ),
    gulp.parallel(
        watch,
        server,
    ),
);

export const production = gulp.parallel(
    stylesheetsProduction,
    jsProduction,
    imageProduction,
    htmlProduction,
);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question