I try to run a react-native-cli project using react-native start, and the metro bundler fails, saying the following:
events.js 187 throw er; //Unhandled 'error' event Error: EMFILE: too many open files, watch Emitted 'error' event on NodeWatcher isntance at: at NodeWatcher: checkedEmitError (.../react-native-project/node_modules/sane/src/node_watcher.js:143:12) at FSWatcher.emit (events.js:210:5) at FSEvent.FSWatcher:_handle onchange (internal/fs/watchers.js:129:12) { errno: -24, syscall: 'watch', code : 'EMFILE', filename: null ) Process terminated. Press <enter> to close the window
Just close all other files and try again. If you are running on android make sure to run cd android
and ./gradlew clean
before react-native run-android
. If this doesn't fix, there might be problem with your file watching service. Try this
$ brew update $ brew install watchman
I'm using a Mac and got the EMFile error. It was resolved when I installed the file watcher
brew install watchman
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With