Cant build APK - Connect ECONNREFUSED - Connecting to Metro bundler failed

I’ve been trying to run expo:build but it always returns the same “connect ECONNREFUSED”

Connecting to Metro bundler failed

I’be tried to reinstall expo-cli, delete all node_modules and .expo, run expo start -c, expo start --lan, expo publish and then expo:build but none of this works. I need to build an apk to test on a few android phones but I can’t get it working. ps. before it worked when i ran expo start to develop, now even that is not working and gives me the same error.

By running telnet, it seems that the problem is on the port 19001 (it seems that expo itself shuts down this port…

Expo diagnostics:

Expo CLI 4.2.1 environment info:
      OS: macOS Mojave 10.14.6
      Shell: 3.2.57 - /bin/bash
      Node: 12.14.1 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
      CocoaPods: 1.9.1 - /usr/local/bin/pod
      iOS SDK:
        Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
      Android Studio: 3.5 AI-191.8026.42.35.6010548
      Xcode: 11.2/11B52 - /usr/bin/xcodebuild
      expo: ~39.0.2 => 39.0.3 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: => 0.63.2 
      react-native-web: ~0.13.12 => 0.13.18 
      react-navigation: ^4.0.0 => 4.4.3 
      expo-cli: 4.2.1
    Expo Workflow: manage

Full error:

 expo build:android
✔ Choose the build type you would like: › apk
Checking if there is a build in progress...

Accessing credentials for ____ in project _____

› Expo SDK: 39.0.0
› Release channel: default
› Workflow: Managed

Building optimized bundles and generating sourcemaps...
Could not get status from Metro bundler. connect ECONNREFUSED
Connecting to Metro bundler failed.
Error: Connecting to Metro bundler failed.
    at _waitForRunningAsync (/@expo/xdl@59.0.24/src/start/startLegacyReactNativeServerAsync.ts:342:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.