-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
OS X: "Error: EMFILE: too many open files, watch" when running tests #4540
Comments
The easiest thing would be to install Watchman: $ brew update
$ brew install watchman If you don't have /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
Thanks, that fixes the problem -- what's the story on this one, out of interest? |
Machines vary, but there is a limit to the number of open files (because of how it watches, more on that later) -- if you use Lots of people don't hit this until they start depending on a ton of dependencies, which is why there's not many issues about it. Watchman is specially designed to watch arbitrarily large number of files without issue, and people normally install it by the time their applications grow to such a large size because Jest recommends it in the docs somewhere iirc. Anyway, the important part of the backstory is that newer versions of Jest watch files differently now to prevent this issue, and that version is available in the 2.0 beta. 1.0 is using an older version of Jest which a patch-release isn't going to be cut for. |
Is this a bug report?
Maybe. This may well not be a
create-react-app
issue as such, but hoping someone could point me in the right direction.Environment
Steps to Reproduce
npx create-react-app new-app
package.json
:yarn test
Expected Behavior
Tests are executed.
Actual Behavior
Other
I've tried first raising the limit of open files to 65536, but still get the above error:
Any ideas on how to work around this? Thanks!
The text was updated successfully, but these errors were encountered: