TU Tran

Technologies should serve for business purpose.

NAVIGATION - SEARCH

[Tip/Trick]TypeError: gulp.hasTask is not a function

When update gulp from version 3.x.x to version 4.x.x, you may receive error when run gulp:

Solution:

Replace runSequence by gulp.series as below:

gulp.task('default', function (done) {
    runSequence("task1","task2", function(cb){
		cb();
		done()
	});
});

change to:

 gulp.series("task1","task2", function(cb){
     cb();
     done();
 })();

 

 

 

Add comment