EAS Custom Install Command
E
Ethan Cohen
A custom install command in EAS config would make it much easier to handle monorepos / other custom build setups.
I know that the Expo team is not looking to support monorepo tools other than yarn workspaces as first class citizens, but right now, it seems impossible to properly configure our setup.
We're using a Rush (https://rushjs.io/) monorepo with pnpm as the package manager, and EAS insists on trying to run
yarn install
then failing since it cannot find packages in the pnpm workspace.Allowing a custom "install" script would allow an off ramp for users to macgyver their own solutions.
This could look a lot like Vercel's build configuration (https://vercel.com/docs/concepts/deployments/configure-a-build#install-command)
Brent Vatne
hello! we do a similar check based on lockfiles to determine which package manager to use, however this doesn't appear to work with rush even though pnpm is supported, and so we fall back to yarn as the default. it seems that rush also requires you to invoke a script by path with node (https://github.com/microsoft/rush-example/blob/main/.github/workflows/ci.yml#L24-L25) rather than
pnpm install
. we're working on making the build process fully customizable but until then it may make sense to expose this option. you could also work around this by messing with the yarn
binary in your worker in the pre-install hook, ie: replacing it with a symlink to something that does what you want.E
Ethan Cohen
Brent Vatne: Thanks for the response Brent!
Glad to know that y'all are working on adding more customization.
Specifically for our use case (also tracking on forums I'm also tracking on https://forums.expo.dev/t/eas-install-using-yarn-instead-of-pnpm/70328), I'll take a look at the approach you laid out. Thanks a lot
Robert Fidler
Brent Vatne: Hey Brent, any update on supporting more customizability here? We ended up resorting to publishing npm packages to a private registry from our monorepo and hosting a stub Expo project in a separate repository where we run our EAS builds. The feedback loop for debugging stuff here is pretty bad so we'd like to try to bring the build back into our monorepo. I took a look at the code paths that another member of the Expo team linked us to here (https://forums.expo.dev/t/eas-install-using-yarn-instead-of-pnpm/70328/5) and I think I could pretty easily implement a RushPackageManager in @expo/package-manager (which supposedly is what EAS is using under the hood to resolve the package manager / run commands). Any obvious reason that seems like a bad idea or should I take a quick stab at that?
Robert Fidler
Took a quick stab here, lmk thoughts! https://github.com/expo/expo/pull/23175
Brent Vatne
Robert Fidler: hey rob! we should have an update on customizable builds in about a month. we're in the middle of a release right now so it might take some time to get to your PR, i'll make note to discuss that with the team once things have settled
Robert Fidler
Brent Vatne: Cool sounds good, will track updates + good luck w/ the release!