Closed bersbersbers closed 2 months ago
Two more notes:
useFsEvents: false
(compare https://github.com/paulmillr/chokidar/issues/999#issuecomment-636016792) is not helping.the problem is resolved by Ctrl-C'ing
node
...
This is not supposed to mean that chokidar
is hanging. It is processing subsequent events just fine if not terminated.
I experienced something similiar. I've got a dockerized environment running on windows, that uses chokidar to watch for file changes. The events don't trigger on the dockerized environment, causing updates not to flow through.
Using usePolling: true
helped for me though
I see the same thing as #999 on Windows. Essentially, I get only one or two (initial/final) change events for a file despite continuously appending to it. I see the same kind of issues in real life, e.g., VS Code auto-updates of output from https://github.com/pkolaczk/fclones on Windows are stalled until re-focusing VS Code (compare https://github.com/microsoft/vscode/issues/93277).
To reproduce, I used the same code for
index.js
as https://github.com/paulmillr/chokidar/issues/999#issue-592779484, andContinuously append to an existing file
(Without the
ping
, which emulates asleep
on Windows, it works sometimes, and sometimes not.)Interestingly, the problem is resolved by Ctrl-C'ing
node
and restarting the aboveindex.js
- so events seem to be generated, butchokidar
seems to choke on them somehow.Also, the issue does not reproduce with either of the following variants:
Continuously append to an initially missing file (hence creating it first)
Continuously write to a new file
Create a new file in each loop iteration
Append to a file in each loop iteration
chokidar@3.5.3, node v20.8.0, Windows 10 22H2,
cmd.exe