Skip to content

[eas-cli] Print actionable error when app config can't be read because dependencies aren't installed - #4080

Open
expo-tuft[bot] wants to merge 11 commits into
mainfrom
ide/read-config-without-node-modules
Open

[eas-cli] Print actionable error when app config can't be read because dependencies aren't installed#4080
expo-tuft[bot] wants to merge 11 commits into
mainfrom
ide/read-config-without-node-modules

Conversation

@expo-tuft

@expo-tuft expo-tuft Bot commented Jul 24, 2026

Copy link
Copy Markdown

Why

Running EAS CLI in a project whose dependencies aren't installed (e.g. npx eas-cli credentials right after cloning) failed with a confusing error when the app config lists config plugins:

$ npx eas-cli credentials
Failed to resolve plugin for module "expo-router" relative to "/Users/ide/exampleapp". Do you have node modules installed?

The error hints at the problem but doesn't say what to do. EAS CLI needs the project's dependencies to read the app config — it runs expo config with the project's own copy of Expo CLI so the config is resolved consistently — so this case should be handled gracefully with a useful error message.

How

In the branch where the project's Expo CLI isn't resolvable, check upfront whether expo is declared in package.json dependencies but can't be resolved — the signal that dependencies aren't installed. In that case, fail immediately with a direct, actionable message that includes the install command detected from the project's lockfile (npm/yarn/pnpm/bun via resolvePackageManager):

EAS CLI needs your project's dependencies to be installed to read your app config. Run yarn install in your project directory and run this command again.

Config resolution itself is unchanged: projects with Expo CLI available still run expo config, and projects that don't declare expo are still read with the copy of @expo/config bundled with EAS CLI.

Test Plan

  • Added unit tests: the actionable error when expo is declared but not installed, and the bundled @expo/config fallback when expo isn't declared. yarn test src/project/__tests__/expoConfig.test.ts
  • Manually reproduced with a fixture project (package.json declaring expo/expo-router, no node_modules, app.json with "plugins": ["expo-router"]):
    • Before: eas credentials failed with only the Failed to resolve plugin for module "expo-router" error.
    • After: it prints the actionable message above; with a yarn.lock present it suggests yarn install, otherwise npm install.
    • A project without expo in dependencies behaves as before.

…stalled

Co-authored-by: ide <379606+ide@users.noreply.github.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

Co-authored-by: ide <379606+ide@users.noreply.github.com>
@github-actions

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.

…back

Co-authored-by: ide <379606+ide@users.noreply.github.com>
@expo-tuft expo-tuft Bot changed the title [eas-cli] Read app config without plugins when dependencies aren't installed [eas-cli] Print actionable error when app config can't be read because dependencies aren't installed Jul 24, 2026
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
…ing getConfig

Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/__tests__/expoConfig.test.ts Outdated
Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/__tests__/expoConfig.test.ts Outdated
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.64%. Comparing base (246d0c0) to head (d3202a7).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4080      +/-   ##
==========================================
+ Coverage   61.59%   61.64%   +0.06%     
==========================================
  Files         981      981              
  Lines       43960    44003      +43     
  Branches     9225     9240      +15     
==========================================
+ Hits        27072    27123      +51     
+ Misses      15441    15434       -7     
+ Partials     1447     1446       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

expo-tuft Bot and others added 2 commits July 24, 2026 15:01
…Expo CLI

Co-authored-by: ide <379606+ide@users.noreply.github.com>
Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/__tests__/expoConfig.test.ts Outdated
Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
Co-authored-by: ide <379606+ide@users.noreply.github.com>
Comment thread packages/eas-cli/src/project/expoConfig.ts Outdated
@ide
ide requested a review from brentvatne July 25, 2026 04:30
Co-authored-by: ide <379606+ide@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

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.

1 participant