Repository navigation
[eas-cli] Resolve @expo/cli from the installed expo package - #4818
Open
pcbeingused333 wants to merge 2 commits into
Open
pcbeingused333 wants to merge 2 commits into
pcbeingused333 wants to merge 2 commits into
Conversation
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.
|
Subscribed to pull request
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4749
Why
shouldUseVersionedExpoCLIExpensiveandshouldUseVersionedExpoCLIWithExplicitPlatformsExpensiveresolve@expo/clifrom the project directory. When@expo/cliis not hoisted (npm nesting it undernode_modules/expo/node_modules, or pnpm's strict layout), that lookup fails andeas updatetakes the legacy global Expo CLI branch, passing--experimental-bundle --non-interactiveto the project's own CLI (hence the--non-interactive is not supportedwarning).How
A small helper keeps the existing lookup from the project directory first (unchanged for hoisted installs) and otherwise resolves
@expo/clifrom the directory ofexpo/package.json, the wayexpo/bin/clifinds it. Both checks use the helper. A changeset is included.Test Plan
New
expoCli-resolution-test.tsbuilds a layout on disk where@expo/cliis only reachable next to the realexpopackage 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 inexpoCli-test.tsnow queues twoundefinedresults, since the helper makes a second lookup.jest src/utils/__tests__/expoCli-test.ts src/utils/__tests__/expoCli-resolution-test.ts: 11 passed;oxfmt --checkandoxlintclean on the touched files.Disclosure: this change was prepared with the assistance of an AI coding agent (Claude).