-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gulp.watch(...) not working on Windows #222
Comments
Need: gulpfile, |
Also this is probably a gaze problem, gulp doesn't actually have any file watching logic in it. |
gulpfile: exactly the same one as in README.md I tried using gulp-watch module, and it works. gulp-watch uses gaze too. |
This is expected behavior - what's the problem? The task just sets up watchers and ends. The node process will continue running (it's watching the files). When you modify files being watched then whatever handler was set up will be called. |
No, there is a problem. The watching doesn't work: it doesn't run the task when some of the files change. |
@johnnypopcorn When you open an issue you need to provide as much information as possible. "Doesn't work" is usually going to get your issue closed quickly. I need the full path of the file you're modifying, your working directory where you are running the gulp process, location of your gulpfile, etc. |
OK, I'll try again with simplified gulpfile and directory structure. node version: My directory structure:
Steps to reproduce: Expected behavior:
Actual behavior:
This probably isn't gaze issue, because third-party gulp-watch npm module uses gaze too, but works for me. |
Try ** only matches directories |
Sorry, I made that mistake when simplifying the gulpfile. New gulpfile:
Issue still persists. |
You are using gulp 3.4.0 that doesn't support this |
Updated to 3.5.0 and it works, thanks. I have no idea why npm installed the older version for me. |
Thanks @darsain |
I have this exactly same problem. Running |
I have a similar problem too |
I downgraded to |
Looks like this is the issue that some google search results will lead to (how I got here). For reference, and if you still can't reopen the issue, could we get a link to the currently open issue that does regard this, if any exists? Still a problem. Similar specs as @justindra
|
Same issue happening here: node v6.11.4 |
Interestingly @jungleBadger I just noticed that the Windows built-in CLI ( I've normally been having this problem consistently when utilizing Jet Brain's (or specifically: PhpStorm) integrated terminal window. Maybe this is some kind of race condition where |
@patricknelson it does happen to me in any cmd (git bash, cmd, powershell) that I use. And in fact I do use jetbrains (webstorm) IDE. |
🎉 Alright, I've fixed my issue. Turns out it wasn't related to I fixed my issue by converting my code to gulp-bro which has a much simpler syntax and works like a regular |
hey @patricknelson I will change it and give it a try. Without the "edit mode" option my browserify/watchify routine ran much better and consistent but it stills does not recognize properly sometimes, and to bypass those situations I need go to code and put a new line anywhere then the build is triggered just fine. I will give a try to gulp-bro later and let you know if it worked (working on macbook right now). Thanks!! |
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, butgulp watch
fails to update the minified file when the original changes.The console output:
There is no prompt afterwards, it continues "running", but it doesn't do anything.
The text was updated successfully, but these errors were encountered: