expo / expo/eas-cli

`eas build:dev` "fails" if dev server is already running

Open
#3,317 0 comments 1 reaction 0 assignees View on GitHub
needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

### Build/Submit details page URL

_No response_

### Summary

`eas build:dev` works great, but if you're already running a copy of the dev server, the build "fails" because the final build step is to `startDevServerAsync` [unconditionally](https://github.com/expo/eas-cli/blob/ea7cc6b1ea5dc0f20fccec4daac193130c3f1c8c/packages/eas-cli/src/commands/build/dev.ts#L336C17-L336C36).

Example output:

```
❯ eas build:dev --platform android
Environment variables with visibility "Plain text" and "Sensitive" loaded from the "development" environment on EAS: ****
Environment variables loaded from the "development-simulator" build profile "env" configuration: ****

✔ Computed project fingerprint
✨ Calculated fingerprint hash: ****

✔ 🎯 Found successful build with matching fingerprint on EAS servers. Running it...

Using cached app...

Using open emulator: Medium_Phone_API_36

Installing your app...
✔ Successfully installed your app!

Starting your app...
✔ Successfully started your app!

Starting development server: npx expo start --dev-client --android
[expo-cli] env: load .env.development.local .env
[expo-cli] env: export EXPO_PUBLIC_****
[expo-cli] Starting project at /path/to/app
[expo-cli] › Port 8081 is running this app in another window
[expo-cli] /path/to/app (pid 49209)
[expo-cli] Input is required, but 'npx expo' is in non-interactive mode.
[expo-cli] Required input:
[expo-cli] > Use port 8082 instead?
[expo-cli] › Skipping dev server
/path/to/app/node_modules/expo/bin/cli start --dev-client --android exited with non-zero code: 1
Error: build:dev command failed.
```

Despite this error, the build does install and run just fine.

Perhaps the script should assume the running metro instance is okay to use and not fail. Or the command could take a new flag like the `expo` CLI does: `--no-bundler`.

### Managed or bare?

Bare, though I think this doesn't matter

### Environment

expo-env-info 2.0.8 environment info:
System:
OS: macOS 15.7.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - ~/.local/state/fnm_multishells/21334_1768454354344/bin/node
Yarn: 4.10.3 - ~/.local/state/fnm_multishells/21334_1768454354344/bin/yarn
npm: 10.9.2 - ~/.local/state/fnm_multishells/21334_1768454354344/bin/npm
Watchman: 2025.03.10.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.16.2 - /Users/chris/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 25.0, iOS 26.0, macOS 26.0, tvOS 26.0, visionOS 26.0, watchOS 26.0
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2513.14007798
Xcode: 26.0.1/17A400 - /usr/bin/xcodebuild
npmPackages:
babel-preset-expo: ~54.0.0 => 54.0.3
expo: ~54.0.0 => 54.0.12
react: 19.1.0 => 19.1.0
react-native: 0.81.4 => 0.81.4
npmGlobalPackages:
eas-cli: 16.28.0
Expo Workflow: bare

### Error output

_No response_

### Reproducible demo or steps to reproduce from a blank project

1. Run metro via `expo start`
2. In another terminal kick off an EAS dev build: `eas build:dev --platform android`
3. Once the build is successful, note the "failed" output and exit code

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.