You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It only triggers for the first file change and then not anymore.
This happens on my Linux machine, but not with my colleague who uses Window.
Note: This is not because we forgot about the done callback.
> gulp singleFile
[15:49:44] Using gulpfile ~/builder/workspace/walls.io/gulpfile.js
[15:49:44] Starting 'singleFile'...
... now I change file.js ...
[15:49:53] Starting 'runSingleFileWatcher'...
[15:49:53] Finished 'runSingleFileWatcher' after 838 μs
... I change file.js again, but nothing happens …
> gulp multipleFiles
[15:50:51] Using gulpfile ~/builder/workspace/walls.io/gulpfile.js
[15:50:51] Starting 'multipleFiles'...
... now I change file.js ...
[15:50:55] Starting 'runMultipleFilesWatcher'...
[15:50:55] Finished 'runMultipleFilesWatcher' after 1.59 ms
... now I change file.js again ...
[15:50:57] Starting 'runMultipleFilesWatcher'...
[15:50:57] Finished 'runMultipleFilesWatcher' after 254 μs
... now I change file.js again ...
[15:50:59] Starting 'runMultipleFilesWatcher'...
[15:50:59] Finished 'runMultipleFilesWatcher' after 543 μs
... now I change file.js again ...
[15:51:01] Starting 'runMultipleFilesWatcher'...
[15:51:01] Finished 'runMultipleFilesWatcher' after 590 μs
Workarounds
Using a wildcard in the filepath (see exports.multipleFiles)
If I use {usePolling: true} it works
constgulp=require('gulp');// This will only trigger for the first file changeexports.singleFile=()=>{gulp.watch("file.js",functionrunSingleFileWatcher(done){done();});};// This works as expectedexports.multipleFiles=()=>{gulp.watch("file.js*",functionrunMultipleFilesWatcher(done){done();});};
What version of gulp are you using?
CLI version: 2.2.0
Local version: 4.0.0
What versions of npm and node are you using?
Node: v8.11.4
Npm: 5.6.0
Running on Linux / Ubuntu 18.04.2 LTS
The text was updated successfully, but these errors were encountered:
What were you expecting to happen?
gulp.watch()
should trigger on each file change.What actually happened?
It only triggers for the first file change and then not anymore.
This happens on my Linux machine, but not with my colleague who uses Window.
Note: This is not because we forgot about the
done
callback.Workarounds
exports.multipleFiles
){usePolling: true}
it worksWhat version of gulp are you using?
CLI version: 2.2.0
Local version: 4.0.0
What versions of npm and node are you using?
Node: v8.11.4
Npm: 5.6.0
Running on Linux / Ubuntu 18.04.2 LTS
The text was updated successfully, but these errors were encountered: