Closed Singloo closed 1 year ago
Hitting this as well, and it likely causes this two: https://github.com/storybookjs/storybook/issues/22253 https://github.com/vitejs/vite/issues/14126. Though for me it gets triggered from this line https://github.com/paulmillr/chokidar/blob/08318d62f1fa731122d2b8853400f1b3252db8c9/lib/fsevents-handler.js#L249 and a similar kind of unknown event.
This event basically means that chokidar or its user isn't processing events fast enough, and as such, must rescan the directory recursively for changes by itself as the FSEvents API dropped/coalesced those events. But for some reason type
seems to be unset for this event which confuses chokidar. There seems to be a fix for this in fsevents already: https://github.com/fsevents/fsevents/commit/63709df0fd91549050e2e3f38b1695f49f6387a8, but it wasn't released. You can use patch-package/pnpm patch or so on to apply the fix locally or override to get fsevents from Git.
https://developer.apple.com/documentation/coreservices/kfseventstreameventflagmustscansubdirs https://developer.apple.com/documentation/coreservices/kfseventstreameventflaguserdropped
This event basically means that chokidar or its user isn't processing events fast enough, and as such, must rescan the directory recursively for changes by itself as the FSEvents API dropped/coalesced those events. But for some reason
type
seems to be unset for this event which confuses chokidar. There seems to be a fix for this in fsevents already: fsevents/fsevents@63709df, but it wasn't released.https://developer.apple.com/documentation/coreservices/kfseventstreameventflagmustscansubdirs https://developer.apple.com/documentation/coreservices/kfseventstreameventflaguserdropped
It works, many thanks
@paulmillr Making a release of fsevents will solve this.
Hi @paulmillr, this is effecting a fairly large number of Vite and Storybook users. Do you think it would be possible to cut a release of fsevents in the near future?
Thanks @Singloo and @segevfiner for troubleshooting and finding the cause!
@pipobscure what's needed to publish this? Seems like GitHub publish workflow is failing. Not sure where to begin.
Released as v2.3.3
Describe the bug
I'm using vite in work dir
WORKDIR
, but everytime after running vite for a while, chokidar will fireunlink
events to all files underWORKDIR
recursively.I debugged a little, I found that the root cause is an unknown event from
fsevents
. Here is the data of the eventThen this line of code will be triggered
Versions (please complete the following information):
latest
16.17.0
and18.15.0
To Reproduce:
I cannot reproduce this issue on other project
Expected behavior Provide a way to ignore some unknown events.
Additional context I have
watchman
,pm2
running on my device