Hi James,
If you are using mx 8, then you should check out building a pluggable widget. The yeoman generator is using the dojo framework and the pluggable widget is using React.
https://docs.mendix.com/howto/extensibility/pluggable-widgets
The documentation for the pluggable widget api shows the differences between pluggable widgets and custom widgets.
The newer version of gulp no longer supports passing task names. Now a function is REQUIRED.
https://stackoverflow.com/questions/39665773/gulp-error-watch-task-has-to-be-a-function
Mendix should fix their own file and keep this up to date, since I imagine it is used a lot by widget developers. In the meantime, change lines 47-49:
gulp.watch("./src/**/*", ["compress"]);
gulp.watch("./src/**/*.js", ["copy:js"]);
gulp.watch("./src/**/*.html", ["copy:html"])
To this:
gulp.watch("./src/**/*", gulp.series(["compress"]));
gulp.watch("./src/**/*.js", gulp.series(["copy:js"]));
gulp.watch("./src/**/*.html", gulp.series(["copy:html"]))