Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

Update to Gulp 4.0, task build error

Can someone help? I am trying to update to Gulp 4.0  but I get an error when running "gulp watch". What am I doing wrong?

 

AssertionError [ERR_ASSERTION]: Task never defined: build

 

The relevant code in my Gulp file is :

 

// Reload all Browsers
gulp.task('bs-reload', gulp.series(function () {
browserSync.reload();
}));

// Browser-Sync task
gulp.task('server', gulp.series('build', function () {
browserSync.init(["css/*.css", "js/*.js"], {
server: { baseDir: "./" , port: 80}
// If you use vhosts use the line below and comment out the line above.
//proxy: "demo.local"
});
}));

 

1 Reply
Ground Controller Lvl 1
Message 2 of 2

Re: Update to Gulp 4.0, task build error