Skip to content

[eas-cli] Resolve @expo/cli from the installed expo package - #4818

Open
pcbeingused333 wants to merge 2 commits into
expo:mainfrom
pcbeingused333:fix/expo-cli-resolve-pnpm
Open

pcbeingused333 wants to merge 2 commits into
expo:mainfrom
pcbeingused333:fix/expo-cli-resolve-pnpm

Conversation

@pcbeingused333

Copy link
Copy Markdown

Fixes #4749

Why

shouldUseVersionedExpoCLIExpensive and shouldUseVersionedExpoCLIWithExplicitPlatformsExpensive resolve @expo/cli from the project directory. When @expo/cli is not hoisted (npm nesting it under node_modules/expo/node_modules, or pnpm's strict layout), that lookup fails and eas update takes the legacy global Expo CLI branch, passing --experimental-bundle --non-interactive to the project's own CLI (hence the --non-interactive is not supported warning).

How

A small helper keeps the existing lookup from the project directory first (unchanged for hoisted installs) and otherwise resolves @expo/cli from the directory of expo/package.json, the way expo/bin/cli finds it. Both checks use the helper. A changeset is included.

Test Plan

New expoCli-resolution-test.ts builds a layout on disk where @expo/cli is only reachable next to the real expo package and checks the versioned CLI is detected; a second case checks it is still not detected when neither is reachable. The first case fails without the change. The existing "not installed" test in expoCli-test.ts now queues two undefined results, since the helper makes a second lookup. jest src/utils/__tests__/expoCli-test.ts src/utils/__tests__/expoCli-resolution-test.ts: 11 passed; oxfmt --check and oxlint clean on the touched files.

Disclosure: this change was prepared with the assistance of an AI coding agent (Claude).

With pnpm's strict node_modules, @expo/cli is a dependency of expo and is
not visible from the project directory, so the versioned Expo CLI check
failed. Fall back to resolving it from the directory of expo/package.json.
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eas update uses the legacy export command (and warns --non-interactive is not supported) when npm nests @expo/cli under expo

1 participant