Gulp. Series() Not Function When Running Multiple Tasks

I am trying to run multiple gulp tasks one after another in synchronised fashion

but i got the following error

TypeError: gulp.series is not a function

Code

gulp.task('default',function () {
    gulp.watch('resources/assets/js/components/*.js', function() {
        gulp.series('scripts','compress');
    });
}) 
2

2 Answers

If you want to use gulp.series and gulp.parallel you need gulp 4.0.

To get 4.+ which is technically in beta but has been around for a long time, use gulp v4

npm i gulp@4.0.0-alpha.2

Update 13 July 2020

Gulp v4 was released December 2018

npm i gulp@4.0.0 --save-dev
5

Also you may install gulp version 4 using:

npm i gulpjs/gulp#4.0 --save-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest