Skip to content
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

Only build FSEvents when using MacOS #1024

Closed
nicholaschiang opened this issue Jul 31, 2020 · 2 comments
Closed

Only build FSEvents when using MacOS #1024

nicholaschiang opened this issue Jul 31, 2020 · 2 comments

Comments

@nicholaschiang
Copy link

Describe the bug

NPM and Yarn log a warning message saying that the FSEvents build was skipped when running on Linux and Windows machines (this is a duplicate of #460). This is expected.

Ideally, though, chokidar would be smart enough to avoid this warning (when it is expected) by only installing and building FSEvents when the user is on MacOS.

Versions (please complete the following information):

  • Chokidar version: 2.1.8
  • Node version: 14.7.0
  • OS version: Ubuntu 18.04.2

To Reproduce:

  1. Get Linux or Windows machine.
  2. Install chokidar using Yarn v2 (or NPM, the warning should still be there).
  3. See warning message:
$ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0.52s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0.99s
➤ YN0000: ┌ Link step
➤ YN0062: │ fsevents@patch:fsevents@npm%3A2.1.3#builtin<compat/fsevents>::version=2.1.3&hash=495457 The platform linux is incompatible with this module, building skipped.
➤ YN0062: │ fsevents@patch:fsevents@npm%3A1.2.13#builtin<compat/fsevents>::version=1.2.13&hash=495457 The platform linux is incompatible with this module, building skipped.
➤ YN0000: └ Completed in 1.97s
➤ YN0000: Done with warnings in 3.71s

Expected behavior

FSEvents should only be installed, built, and used when the user is on MacOS (thus avoiding this warning to begin with).

@paulmillr
Copy link
Owner

I don't see a way to solve this in chokidar. Report this to NPM or Yarn. We specify supported platforms in fsevents package.json, these bundlers should understand this.

@cwadrupldijjit
Copy link

FYI for any who arrive here looking at the same sort of issue, this issue does have a bug report on NPM, though I don't know that anybody from the NPM team itself has looked at it, since I don't see any comments written by one of them yet. I don't much like the workarounds for the issue, either, but I figure that I could stick a link to the issue here for any who are interested:
npm/cli#2921

zqianem added a commit to zqianem/chokidar that referenced this issue Aug 22, 2022
Would previously flake due to originally non-existant directory being
created too quickly or due to not waiting for all 5 events to fire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants