Closed izakfilmalter closed 1 year ago
The error message is correct, there is no such version. yarn 2 and yarn 3 is sth you configure in your project. yarn
that is installed globally should be 1.x.x
@wkozyra95 The problem is I was able to do this on previous versions of EAS. It might have been using yarn 1, but it didn't error when you had yarn 3.
I find it very unlikely, you can check on https://www.npmjs.com/package/yarn?activeTab=versions that there is no such version, I do not see a way where specifying 3.x.x
version for yarn in eas.json would work.
The project you linked does not have any successful builds, and the other project does not use a custom yarn version. Can you link to a build where that worked?
Here is a build that is successful using the following eas.config: https://expo.dev/accounts/steeple/projects/krew/builds/0b5b3087-358e-42e5-9b9d-35e3284ec814
{
"cli": {
"version": ">= 1.1.1",
"appVersionSource": "remote"
},
"build": {
"base": {
"node": "16.13.0",
"yarn": "3.2.2",
"android": {
"image": "ubuntu-18.04-jdk-11-ndk-r19c"
}
},
"dev-local-sim": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
}
},
"dev-local": {
"developmentClient": true,
"distribution": "internal"
},
"prod-local": {
"extends": "dev-local"
},
"preview": {
"env": {
"RELEASE": "true",
"FLIPPER_DISABLE": "1"
},
"distribution": "internal",
"channel": "preview"
},
"production": {
"autoIncrement": true,
"env": {
"RELEASE": "true",
"FLIPPER_DISABLE": "1"
},
"channel": "production"
}
},
}
This build is using dev-local
profile. This profile does not extend base
profile so yarn and node are not specified there.
So what is the right pathway to use yarn berry for eas then? https://github.com/yarnpkg/berry
This is where v2 and v3 of yarn is located.
It's the same as you use it locally there is nothing EAS specific here, yarn v2 and v3 are installed in your project. Globally installed yarn v1 is just bootstrapping the project.
Sorry to continue the conversation, but @wkozyra95 does EAS not support yarn modern (2+) at all without custom hook? I extended my eas.json
specifying yarn@4.1.1 but eas build
doesn't work.
@tyeetale I added this command to my package.json scripts which fixed it: "eas-build-pre-install": "corepack enable && corepack prepare yarn@4.1.1 --activate"
you can and .yarnrc.yml
, if your local project has .yarn directory, it will also be upload.
the file content is
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.6.1.cjs
@tyeetale I added this command to my package.json scripts which fixed it: "eas-build-pre-install": "corepack enable && corepack prepare yarn@4.1.1 --activate"
This worked perfectly for me (with yarn@4.5.0), thank you very much @sdemoor ! For future readers, can check out docs
Build/Submit details page URL
https://expo.dev/accounts/steeple/projects/church-phone/builds/3488139c-54da-4381-bdb3-945d2107ef17
Summary
Building with a custom yarn version seems to have broken with 3.3.0.
eas.json
:Managed or bare?
bare (prebuild)
Environment
Error output
Reproducible demo or steps to reproduce from a blank project
Add a yarn 3 version to your eas.json. I have tried several version, all fail.