最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - gulp.series() not function when running multiple tasks - Stack Overflow

programmeradmin2浏览0评论

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/ponents/*.js', function() {
        gulp.series('scripts','press');
    });
}) 

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/ponents/*.js', function() {
        gulp.series('scripts','press');
    });
}) 
Share Improve this question edited Jul 13, 2020 at 8:16 Kirill Matrosov 6,0004 gold badges29 silver badges39 bronze badges asked Jun 3, 2017 at 11:28 JabaaJabaa 1,7537 gold badges36 silver badges63 bronze badges 2
  • Which version of gulp do you use? – Kirill Matrosov Commented Jun 3, 2017 at 15:09
  • Using Latest gulp – Jabaa Commented Jun 3, 2017 at 15:10
Add a ment  | 

2 Answers 2

Reset to default 11

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 [email protected]

Update 13 July 2020

Gulp v4 was released December 2018

npm i [email protected] --save-dev

Also you may install gulp version 4 using:

npm i gulpjs/gulp#4.0 --save-dev
发布评论

评论列表(0)

  1. 暂无评论