2

I am running ubuntu 18.04

I get this when trying to start my expo server with exp start (I have also tried exp start -c, exp start -c --tunnel, exp start --tunnel).

I get:

felix:~/job/App (dev) $ exp start
[11:50:59] Using project at /home/felix/job/App
[11:51:08] Scanning folders for symlinks in /home/felix/job/App/node_modules (8ms)
[11:51:08] Starting Metro Bundler on port 19001.
[11:51:08] Metro Bundler ready.
[11:51:08] Successfully ran `adb reverse`. Localhost urls should work on the connected Android device.
[11:51:10] Tunnel ready.
[11:51:10] Expo is ready.

[11:51:10] Your URL is: exp432e0186c47243658eeef37602b6c1c4://10.114.17.163:19000
[11:51:10] Logs for your project will appear below. Press Ctrl+C to exit.
[11:51:15] Metro Bundler failed to start. (code: EACCES)

I have tried reinstalling expo, node modules, metro. I have removed my .expo file so that it could be regenerated.

I have (I think) the right permissions on all my files. I do own the repo in my home directory, i dont know if expo creates any files in my root directories.

Mabye there is a way to check exactly where metro bundler failed and threw the error?

Worth noticing is if I create a new app with create-react-native-app and start the server with exp start then it works!! So there semeems to be something wrong with my this repo? Other people with the same operating system can get this to work by simply cloning the repo and starting it with exp start.

mrfr
  • 1,724
  • 2
  • 23
  • 44

4 Answers4

1

sudo exp start has fixed this for me in the past. EACCES usually has to do with a permissions based error

Llama D'Attore
  • 323
  • 1
  • 12
0

I solved it. The problem was that metro bundler (the program that builds your js files) could not connect to my android emulator. This was due to that the emulator was created by a root user, so therefor metro bundler did not have the correct permissions so therefor it threw a EACCES error.

What I did was to create a new android emulator with my users permission, then it worked.

mrfr
  • 1,724
  • 2
  • 23
  • 44
0

you could equally run command prompt as administrator and execute

net stop http

and then execute

net start http

to restart all ports to make sure its not a connectivity problem

Vine
  • 46
  • 9
0

you can run:

sudo expo start --tunnel 
Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
mimz
  • 1
  • Expo DevTools is running at http://localhost:19002 Opening DevTools in the browser... (press shift-d to disable) Could not get status from Metro bundler. connect ECONNREFUSED 127.0.0.1:19003 Connecting to Metro bundler failed. Error: Connecting to Metro bundler failed. at _waitForRunningAsync (/@expo/xdl@57.9.1/src/Project.ts:1544:11) at process._tickCallback (internal/process/next_tick.js:68:7) you get the error type – mimz May 03 '20 at 19:21