question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp.watch(...) not working on Windows

See original GitHub issue

gulp.watch doesn’t seem to work for me, and I think it’s a Windows-related issue. If I use the example gulpfile.js from the readme, create the directory structure (client/js, client/img, build/js, build/img), and a dummy js file in the client/js folder, the gulp scripts task runs normally and minifies the script, but gulp watch fails to update the minified file when the original changes. The console output:

>gulp watch
[gulp] Using file C:\Users\JP\Documents\gulptest\gulpfile.js
[gulp] Working directory changed to C:\Users\JP\Documents\gulptest
[gulp] Running 'watch'...
[gulp] Finished 'watch' in 17 ms

There is no prompt afterwards, it continues “running”, but it doesn’t do anything.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
shnigicommented, Oct 10, 2016

I have this exactly same problem. Running $ gulp -v [12:10:36] CLI version 3.9.1

3reactions
JanPokornycommented, Jan 31, 2014

No, there is a problem. The watching doesn’t work: it doesn’t run the task when some of the files change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp Watch does not work on Windows Subsystem for Linux 2 ...
Everything works fine except gulp watch. I use VSCode as text editor. I have configured gulp watch properly to recompile sass files on...
Read more >
Gulp Watch Task Not Working With Docker
My current solution is to run Docker Windows Volume Watcher on my local machine while I see if I can integrate this solution...
Read more >
gulp watch not working - Forums - Liferay
This issue should be resolved with v1.3.9 of liferay-theme-tasks. If you delete the node_modules directory of your theme, and then run npm install...
Read more >
watch() - gulp.js
name type default ignoreInitial boolean true delay number 200 queue boolean true
Read more >
Gulp - Watch - Tutorialspoint
Gulp - Watch, The Watch method is used to monitor your source files. When any changes to the source file is made, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found