eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

EAS Build Fails to Use Yarn v4, Defaults to v1 Despite Correct Corepack Configuration

Open LailaAli opened this issue 5 months ago • 3 comments

Minimal reproducible example

My repository is private, but it is a standard Yarn v4 Turborepo monorepo that is correctly configured to use Corepack. The bug can be reproduced by attempting to run an eas build on the project. I can grant temporary access to an Expo team member for debugging purposes upon request.

Key characteristics of the repository:

  • Uses Yarn Workspaces (Turborepo).
    
  • package.json specifies "packageManager": "[email protected]".
    
  • The .yarn/releases/yarn-4.1.1.cjs binary and the .yarnrc.yml config file are both correctly committed to the repository.
    
  • The project uses expo-dev-client and requires a development build.
    

Steps to reproduce

  1. Gain access to the private repository (I can grant temporary access to an Expo team member upon request).
  2. Clone the repository: git clone <repo-url>
  3. Navigate into the project directory: cd paird
  4. Enable Corepack to ensure the correct package manager is used: corepack enable
  5. Install dependencies locally to confirm the project is valid: yarn install
  6. Initiate the build on EAS, which will trigger the bug: eas build --profile development --platform android
  7. Observe that the build fails during the "Install dependencies" step with a Yarn version mismatch error, despite the repository being correctly configured. This demonstrates the issue is with the EAS build environment.

Environment

expo: 53.0.20
react: 19.0.0
react-native: 0.79.5
eas-cli: Latest version
yarn: 4.1.1 (managed by Corepack)
Node.js: v20+
Monorepo Tool: Turborepo

Local OS: macOS

Target Platform: Android

Expo Doctor Diagnostics

I ran `npx expo-doctor` and it passed 14/15 checks. The only failure was "Validate packages against React Native Directory package metadata" for the packages `buffer`, `cors`, `date-fns-tz`, and `expo-pwa`. This is unrelated to the server-side build environment issue.
----

Build Details Log
Running "yarn install --inline-builds --immutable" in /home/expo/workingdir/build directory
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
yarn install --inline-builds --immutable exited with non-zero code: 1

LailaAli avatar Jul 29 '25 03:07 LailaAli