expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
829 stars 84 forks source link

Error on EAS build install dependencies step with `packageManager` field #2541

Open vvslepkan opened 2 months ago

vvslepkan commented 2 months ago

Build/Submit details page URL

https://expo.dev/accounts/vslepkan/projects/OvoEnergyApp/builds/f0138f57-e3c6-482f-9bcf-e87bba442681

Summary

We are using nx for our monorepo. When I'm trying to create a build, I get this error that makes no sense. I guess it tries to concat values for some unknown reason. Our root package.json has "packageManager": "pnpm@8.13.1" I've tried a few recommendations from https://github.com/expo/eas-cli/issues/2401. I also tried to use eas-build-pre-install in different ways, and the result was always the same.

image

Managed or bare?

bare

Environment

 expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.6.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
      npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
      Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    IDEs:
      Android Studio: 2023.3 AI-233.14808.21.2331.11926650
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      react: * => 18.2.0 
    npmGlobalPackages:
      eas-cli: 12.1.0
    Expo Workflow: bare
✔ Check Expo config for common issues
✖ Check package.json for common issues
✔ Check for issues with metro config
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✖ Check for app config fields that may not be synced in a non-CNG project
✔ Check if the project meets version requirements for submission to app stores
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✖ Check that packages match versions required by installed Expo SDK
✔ Check native tooling versions
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✖ Check that native modules use compatible support package versions for installed Expo SDK

Error output

Running "yarn install" in /Users/expo/workingdir/build/apps/my-account-app directory
error This project's package.json defines "packageManager": "yarn@pnpm@8.13.1". However the current global version of Yarn is 1.22.21.
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 exited with non-zero code: 1

Reproducible demo or steps to reproduce from a blank project

  1. eas build -p ios --profile preview
  2. Check the error on the web ui

// eas.json

"preview": {
      "channel": "preview",
      "ios": {
        "simulator": true,
        "node": "18.12.0"
        }
ShrayBans commented 1 month ago

+1 getting this error as well and been stuck on it for last couple of weeks

This project's package.json defines "packageManager": "yarn@pnpm@8.15.4".
szdziedzic commented 1 month ago

I also tried to use eas-build-pre-install in different ways, and the result was always the same

Did you try to run corepack enable in the preinstall hook?

vvslepkan commented 1 month ago

I also tried to use eas-build-pre-install in different ways, and the result was always the same

Did you try to run corepack enable in the preinstall hook?

I've tried, same error

AlirezaHadjar commented 3 weeks ago

I also tried to use eas-build-pre-install in different ways, and the result was always the same

Did you try to run corepack enable in the preinstall hook?

This worked for me, thanks!