mendixlabs / generator-mendix

Yeoman generator for Mendix widgets
MIT License
17 stars 15 forks source link

Gulp Watch Task Error #35

Closed scchengaiah closed 4 years ago

scchengaiah commented 4 years ago

The below mentioned gulp task generates the following error. Code: gulp.task("default", gulp.series(['build'], function() { gulp.watch("./src/**/*", ["compress"]); gulp.watch("./src/**/*.js", ["copy:js"]); gulp.watch("./src/**/*.html", ["copy:html"]) })); Error: Error: watching ./src/**/*: watch task has to be a function (optionally generated by using gulp.parallel or gulp.series) at Gulp.watch (E:\Activities\Mendix\mendix_workspace\GridSelector-master\node_modules\gulp\index.js:31:11) at E:\Activities\Mendix\mendix_workspace\GridSelector-master\gulpfile.js:47:14 at bound (domain.js:395:14) at runBound (domain.js:408:12) at asyncRunner (E:\Activities\Mendix\mendix_workspace\GridSelector-master\node_modules\async-done\index.js:55:18) at process._tickCallback (internal/process/next_tick.js:61:11)

Fix to Overcome the same - Add Gulp.series calls for all the watch functions. Code: gulp.task("watch", gulp.series(['build'], function() { gulp.watch("./src/**/*", gulp.series("compress")); gulp.watch("./src/**/*.js", gulp.series("copy:js")); gulp.watch("./src/**/*.html", gulp.series("copy:html")) }));

If the issue is replicable for all the users, it is better we fix the same

JelteMX commented 4 years ago

This was fixed in 2.2.5