Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't build the project with packageManager in package.json #2518

Closed
osvald0 opened this issue Aug 27, 2024 · 2 comments
Closed

I can't build the project with packageManager in package.json #2518

osvald0 opened this issue Aug 27, 2024 · 2 comments

Comments

@osvald0
Copy link

osvald0 commented Aug 27, 2024

Build/Submit details page URL

https://expo.dev/accounts/osvaldo.colina/projects/mobileexpo/builds/9397e102-7c12-4b59-b2bc-d4aacf430b63

Summary

I have a turborepo project with an expo app. I'm trying to build the project with eas build, but it fails because the yarn version defined in the package JSON is different from 1.22.21. See the complete error message please.

Managed or bare?

Managed

Environment

expo-env-info:

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.6.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
Yarn: 3.6.4 - ~/.yarn/bin/yarn
npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
Watchman: 2024.03.25.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /Users/osvaldo/.rvm/gems/ruby-3.2.2/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
Android SDK:
API Levels: 27, 28, 29, 30, 31, 32, 33, 34
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.1, 34.0.0
System Images: android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a, android-34 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode: 15.4/15F31d - /usr/bin/xcodebuild
npmGlobalPackages:
eas-cli: 10.2.4
Expo Workflow: managed

expo-doctor:

The following packages should be updated for best compatibility with the installed expo version:
[email protected] - expected version: 18.2.0
[email protected] - expected version: 18.2.0
[email protected] - expected version: 0.74.5
[email protected] - expected version: 4.10.5
[email protected] - expected version: 3.31.1
@types/[email protected] - expected version: ~18.2.79
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies

Error output

We detected that 'apps/mobileexpo' is a yarn workspace
Running "yarn install" in /Users/expo/workingdir/build directory
[stderr]

error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.21.
[stderr]

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.
[stderr]

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

https://github.com/osvald0/turborepo-expo-issue

@osvald0 osvald0 added the needs review Issue is ready to be reviewed by a maintainer label Aug 27, 2024
@szdziedzic
Copy link
Member

Hi,

I believe that you need to run the corepack enable command before the Install node modules step to fix this issue. You can do so, by using our lifecycle hooks: https://docs.expo.dev/build-reference/npm-hooks/#eas-build-lifecycle-hooks. The eas-build-pre-install hook running corepack enable should solve it.

@szdziedzic szdziedzic added eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Aug 27, 2024
@objectiveSee
Copy link

Were you able to get this working with yarn 3.x or did you downgrade to 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@objectiveSee @osvald0 @szdziedzic and others