-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 watching file for changes: EMFILE” when run the examples from facebook/react-native/Examples #10088
Comments
Fwiw, I was running into the same issue, and this solved it: #910 |
Yeah, it was already solved |
i use this command to resolve my problem |
You really do not want to use What you want to do is increase the maximum allowed number of file descriptors. This command will show you the current maximum.
Adding a number will set the maximum to the new value. This will allow you to run the
|
If you have homebrew earlier and you have upgrade to Sierra, then it can solve your problem. Run this in your terminal, then again run react-native build.
|
If anyone else comes across this, installing watchman through brew ended up fixing things for me. |
None of the mentioned solutions helped me |
@SupriyaKalghatgi This may help. It appears to have helped other people already. https://gist.github.com/brennanMKE/f6aa55b452ecda2f4c7a379e21647c88 React Native TroubleUpdating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time. The following command shows the current limit. launchctl limit maxfiles It may show 256 as the lower limit. The following command will change the limits. sudo launchctl limit maxfiles 2048 unlimited Next you also want to uninstall npm uninstall -g react-native-cli
npm install -g react-native-cli
brew update
brew install watchman Now try building and running your React Native project on macOS Sierra. |
Re-installing the node_modules folder worked for me. Just a thought lol. |
Reinstalling node modules worked for me too. But its a pain to do this every time. |
@brennanMKE You saved me like a hero! :) Thanks much! |
For me, it turned out that I had |
I didn't have |
This might be related to #4968
|
If all the above does not work - find out if you have a permission problem with |
This sort of thing happens enough with RN that I just put an entry in my package.json:
Running that fixed whatever problem I was having with this EMFILE thing. |
I didn't have watchman installed. Simply installing via |
If you are like me, I did everything suggested but kept ignoring brew and used npm to install watchman. Using brew fixed it for me. |
I want to run the Examples from facebook/react-native/Examples in OS X 10.12.
First I use npm install and then use npm start:
There is an error:
Then I use Xcode run the code but there is the same error.
Need help or advice. Thanks very much.
p.s. When I init a new project and then use
react-native run-ios
or Xcode , and there is the same errorThe text was updated successfully, but these errors were encountered: