If you try to eas build one of the apps, but you haven't initialized the root of the yarn workspace as a git repo, the build fails.
The problem I encountered, in detail
Context: we do not use git on our prod machines (we deploy via another mechanism), so in prod our yarn workspace is not a git repo
We were running eas build in one of our expo app workspaces, but eas was throwing an error in the install dependencies step, specifically when resolving packages: [stderr] error An unexpected error occurred: "http://10.254.24.9:4873/@sutro%2fcommon: no such package available".
I eventually confirmed (with Kim's help) that eas-cli wasn't uploading the overall yarn workspace directory, but only the directory of the specific app. This turned out to be because we did not have a .git in the "project root", but had allowed eas-cli to auto-initialize the current directory as a github repo (which it recommends if not running in a git repo).
Suggestion
In the "common issues" section of README.md maybe we should mention: "Your entire yarn workspace must be a git repo (i.e. have a .git file in it's root directory), else eas build will not work for your apps that have dependencies on other packages in your workspaces."
(FYI: I have also filed a Canny suggestion for eas-cli to auto detect yarn workspaces and upload the files correctly, which would negate this failure mode)
The problem encountered, TL;DR
If you try to
eas build
one of the apps, but you haven't initialized the root of the yarn workspace as a git repo, the build fails.The problem I encountered, in detail
eas build
in one of our expo app workspaces, buteas
was throwing an error in theinstall dependencies
step, specifically whenresolving packages
:[stderr] error An unexpected error occurred: "http://10.254.24.9:4873/@sutro%2fcommon: no such package available".
eas-cli
wasn't uploading the overall yarn workspace directory, but only the directory of the specific app. This turned out to be because we did not have a.git
in the "project root", but had allowedeas-cli
to auto-initialize the current directory as a github repo (which it recommends if not running in a git repo).Suggestion
README.md
maybe we should mention: "Your entire yarn workspace must be a git repo (i.e. have a.git
file in it's root directory), elseeas build
will not work for your apps that have dependencies on other packages in your workspaces."(FYI: I have also filed a Canny suggestion for
eas-cli
to auto detect yarn workspaces and upload the files correctly, which would negate this failure mode)