-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Chokidar 4.0.1 not responding to add change or unlink events in Bun 1.1.27 #1382
Comments
Is my ignore pattern wrong? |
Reverted to |
I tried your code locally and cant seem to reproduce it I'm on Linux fwiw. I copied the code across, and made 3 directories with one existing file in each I then tried a rename, remove and addition. all 3 triggered the right events for me it could be OS specific, maybe 🤔 |
@43081j are your directories on a volume mount? The interesting part is that using bun |
I've found wsl filesystem events to be very sketchy in general I used to use a similar setup (code on the windows mount, but running commands in wsl). Native watch would miss a lot of events (without chokidar). I moved to having my code in wsl and accessing it from windows (i.e the reverse) You could try throw a script together to |
the code is in wsl, sorry if that wasnt clear. i also run within wsl (i think?) in linux terminal i created a test which targets three folders within ubuntu rather than three directories on windows or an external drive (NTFS). then, chokidar and everything works as expected in my case i cant change the directories because the ubuntu partition is too small to hold all the data |
Yes sorry that's what I meant Within WSL, if you watch a directory on the windows mount, node seems to miss a lot of events If you can test it using |
I recently tried on a mac filesystem (15.1 Sequoia ) . The target directories were on watcher.on('ready', () => { The chokidar client would not detect the 'ready' event, and it couldnt be tested. weird. Edit: mac on mac (app & watch directory) |
I suspect WSL just isn't very reliable cross filesystem still I moved all my code to the Linux container for this reason (both rollup and webpack barely triggered in watch mode since the events go missing inside windows) |
Describe the bug
A clear and concise description of what the bug is.
Versions (please complete the following information):
To Reproduce:
Steps to reproduce the behavior. Include filename and chokidar config.
Ideally prove a problem by isolating and making it reproducible with a very short sample program, which you could paste here:
The above is from
apps/server
and runs viabun --watch run src/index.ts
It uses chokidar wrapper from
packages/core
belowHowever, when I add new files, rename existing files or remove existing files from any of the three directories in the chokidar array, it does not initiate the watch events
I know because there is no console log when there is filesystem activity
It was working before, not sure when it broke. Havent tested in a while
Most valuable could be one or more test cases for test.js to demonstrate the problem.
Expected behavior
when I add new files, rename existing files or remove existing files from any of the three directories in the chokidar array, it should call the add, unlink or change events (
watcher.on()
)The text was updated successfully, but these errors were encountered: