Real quick tip. I was able to setup Gulp on Ubuntu Windows without any problems. The only issue was that I was unable to get “gulp watch” to work. In the obscure reaches of the internet, I finally the trick.
In your gulpfile.js, modify your watch command to include “usePolling:true”.
Looking at the “Watch” documentation (https://gulpjs.com/docs/en/api/watch/), the usePolling option is defined as:
“When false, the watcher will use fs.watch() (or fsevents on Mac) for watching. If true, use fs.watchFile() polling instead – needed for successfully watching files over a network or other non-standard situations. Overrides the useFsEvents default.”
I guess the Ubuntu Window’s sytem is defined as a “non-standard situation”. Maybe its because Ubuntu Windows is treating the folder structure as a “network” drive (even though I’m hosting it as /mnt/c). Regardless, I’m hoping this saves someone a significant amount of time.
GitHub with my entire file that works:
https://github.com/jtsSTECH/GulpWatchWindows/tree/main
