EAS Build: command crashes with ECONNREFUSED

I’m trying to switch from expo build:ios to eas build. I’ve succesfully configured the app, but when I try building, I get a ECONNREFUSED to address

Here’s the error in full:

% eas build
? Build for platforms › - Use arrow-keys. Return to submit.
❯   All
          triggerUncaughtException(err, true /* fromPromise */);

Error: connect ECONNREFUSED
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16) {
  errno: -61,
  syscall: 'connect',
  address: '',
  port: 443

I thought the problem might be that I’m using Cloudflare DNS (which can’t resolve exp.host), but even after turning that off I still get the error:

% ping exp.host
PING exp.host ( 56 data bytes
64 bytes from icmp_seq=0 ttl=104 time=129.861 ms

What is the command trying to do? Any clues on how I might resolve this?

to clarify - you run eas build and then select All and then see this error?

No, before. However, I managed to fix it:

The problem was that I’m using a host block list from https://someonewhocares.org/hosts/hosts. This blocks adware, but also certain domains that Expo needs access to. Removing the list from /etc/hosts solves the problem.

1 Like

Hi, we shouldn’t need access to any of those domains, maybe analytics lib is using some of them, but it should not cause that failure.

I can’t reproduce that issue with that list, can you clarify what OS are you using and what version of cli?


I tried with the latest version of the hosts list and I can’t reproduce the error either. Maybe there was a bad host in the older list, or something, but it seems to be fixed now.

Thanks for your help!