Ike
Ike

Reputation: 81

Why do I keep getting this error code when starting Expo client

To run the app, choose one of: › Scan the QR code above with the Expo app (Android) or the Camera app (iOS). › Press a for Android emulator, or i for iOS simulator, or w to run on web. › Press e to send a link to your phone with email.

Press ? to show a list of all available commands. Logs for your project will appear below. Press Ctrl+C to exit. Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:178:28) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ start: expo start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Upvotes: 8

Views: 2364

Answers (2)

RadekR
RadekR

Reputation: 609

Oybek's solution did not work for me, but it would work if had Intel based Mac computer.

For those who have Apple M1 Silicon based machine such command may be daysaver:

arch -arm64 brew install watchman

or

arch -arm64 brew reinstall watchman

when you have some bad installation of watchman already done.

Upvotes: 4

Oybek Toshmatov
Oybek Toshmatov

Reputation: 427

brew install watchman

running this command solved my exactly same problem. if you look at the error message you are getting, it says:

Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange.

react native is able to use watchman internally to watch its files. I hope this will work for your as well

Upvotes: 9

Related Questions