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

Error: Error watching file for changes: EMFILE after clearing cache #9398

Closed
TheDutchCoder opened this issue Jan 13, 2020 · 5 comments
Closed

Comments

@TheDutchCoder
Copy link

🐛 Bug Report

After manually clearing the cache with --clearCache, jest is no longer able to watch files.

To Reproduce

For me it happened after running jest --config jest.config.js --clearCache --no-cache --maxWorkers=1 --coverage through the npm script.

Then jest --watch --config jest.config.js --maxWorkers=1 --coverage no longer works.

Expected behavior

Watch to still work after clearing the cache.

envinfo

  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  npmPackages:
    jest: ^24.9.0 => 24.9.0
@TheDutchCoder
Copy link
Author

The solution to this is to install watchman through brew (wtf).

I have no idea why:

  1. This would have worked before without watchman
  2. Why --clearCache touches this (if it actually does)

Some insight would be appreciated!

@mcmire
Copy link

mcmire commented Mar 21, 2022

I just ran into this. I am using Jest 26.4.2 on macOS Monterey w/ M1 chip. Encountered this after upgrading from Node 12 to 16.14.2. Same exact error message as here: amasad/sane#180. ulimit is set to unlimited. Installing the watchman package through Homebrew worked for me as well. Not sure if this is expected or not. Very strange.

mcmire added a commit to MetaMask/core that referenced this issue Mar 22, 2022
Ganache supposedly supports Node >= v10, but we are getting some
warnings when running the Ganache server in tests:

    Linking failure in asm.js: Unexpected stdlib member
    bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

This is an attempt to remove these warnings.

This may cause issues when running `jest --watch`. If this does, run
`brew install watchman`. See:

* <jestjs/jest#9398>
* <amasad/sane#180>
@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 21, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants