-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
TypeError: fsevents.watch is not a function #18728
Comments
Isn't this more of a bug in the package manager where it's not installing or providing the correct version of |
Ideally, yes. UPD: wait a second... I was under impression that vite's using fsevents directly (as it lists fsevents in its |
Why not? npm is not giving us the right version based on the semver range we've specified and this looks like a legitimate bug. Is this already reported on npm or other package managers? About chokidar, I doubt they'll make any fix soon as v4 already removed fsevents. We're still on v3 which uses it because there's regressions in v4 that were not ready yet. I feel like it's better to place the effort into fixing the source of the issue than patching or adding workarounds. |
After running the repro with
I think it might be related to npm/cli#4859 |
I also think that this should be fixed on the package manager side. |
Describe the bug
fsevents@~2.3.3
is an optional dependency for vite, and vite can run fine without it.However, if some other package adds
fsevents@1
, vite breaks:Reproduction
probably not reproducible on linux, as fsevents is a mac package
Steps to reproduce
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: