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 with **/*.js and multiple globs not working on Windows

See original GitHub issue

When watching files with Gulp 4, I have the following watch:

gulp.watch(['app/**/*.js', 'app/components/**/*.html']);

On OS X, it works fine for both JS and HTML files, but on Windows 7, making a file change to a JS file does not get detected.

Changing this to the following fixes the issue:

gulp.watch(['app/**/*']);

Also, watching only JS files also works as intended:

gulp.watch(['app/**/*.js']);

It seems only the combination of both globs breaks something causing JS files not to be watched on windows.

Possibly related to https://github.com/floatdrop/gulp-watch/issues/194

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:7
  • Comments:47 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
WestonThayercommented, Jun 9, 2016

+1, I repro this on Windows 10, x64. Any way I can help?

1reaction
adamreisnzcommented, Mar 31, 2016

@puranjayjain sorry, not sure how to debug this, as I don’t have access to windows. And quite frankly, since I only work on Mac myself, this issue doesn’t impact me much so I don’t want to spend too much more time on it.

If this comes back to bite me again some time I might spend some more time analysing it, but for now I wouldn’t know what to do about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gulp watch is not always working - Stack Overflow
Having gulp.watch(['./src/**/*.js', './src/*.js'], ['js']) will work. Keep in mind watch can take an array of strings to watch for, don't call it multiple...
Read more >
watch() - gulp.js
name type default ignoreInitial boolean true delay number 200 queue boolean true
Read more >
Gulp Not Working Gulp Watch - ADocLib
Run gulp start to fire multiple tasks & run gulp js or gulp gulpSass for specific task. 2. The solution again is to...
Read more >
Using Gulp 4 in your workflow for Sass and JS files
Install Gulp by running npm install gulp . Install other npm packages for your Gulp workflow. Create a gulpfile.js file in your project...
Read more >
Getting Started with Gulp.js - Semaphore Tutorial
Learn how to set up and use Gulp.js, a task runner for Node.js based on Node streams ... The watch task will continue...
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