Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

npm

expo

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:

like image 597
Ike Avatar asked Jan 28 '21 10:01

Ike


People also ask

Why is Expo Go not working?

In my case, the issue was fixed by doing the following on my Android (Galaxy Note 5): Go to Settings > Apps > Application Manager > Expo. Scroll down to Draw over other apps and toggle it off and then on again. Close out of everything, re-open expo, and try connecting.

How do I run an expo code?

Opening the app on your phone/tablet To open the app: On your iPhone or iPad, open the default Apple "Camera" app and scan the QR code you see in the terminal. On your Android device, press "Scan QR Code" on the "Home" tab of the Expo Go app and scan the QR code you see in the terminal.


2 Answers

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

like image 179
Oybek Toshmatov Avatar answered Oct 13 '22 07:10

Oybek Toshmatov


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.

like image 35
Rad Avatar answered Oct 13 '22 06:10

Rad