eas build isn't uploading yarn.lock

We’ve run into issues for a while now where one of our RN dependencies will get updated into a broken version, and only discovered today that it seems like our yarn.lock file isn’t getting uploaded to Expo, so our builds are always picking up the latest minor versions given that we don’t pin to an explicit version most of the time.

We’re on a bare workflow, using eas-cli 4.1.2

Reading the build upload documentation, I see that anything specified inside a gitignore will not be uploaded, and it does look like there’s an entry for yarn.lock in our monorepo’s top-level ignore file.

However, if I try to override with an explicit !yarn.lock in our submodule/project’s own gitignore, or even try deleting the one at the top-level, running eas build:inspect --platform [ios|android] --stage archive --output ~/target/output/path --profile production to test still shows no yarn.lock. A package-lock seems to always be included regardless, but we’re using yarn so that isn’t relevant.

Is there something else I need to change to make sure this is sent up? We don’t have an easignore anywhere.

Hi @jwalt

Is there a reason you have yarn.lock in the top-level .gitignore file?

I’m not sure why a !yarn.lock might not override the top-level ignore or why the behaviour might be different for package-lock.json. If you don’t get a better answer then maybe you could create a .easignore file that basically duplicates your .gitignore file, except that it omits yarn.lock.

@wodin I was pretty surprised to see it there myself, and I’m not really sure why it was added. It does appear to be working now though, actually: I realized the build command archives our entire monorepo, not just the project itself, so I wasn’t looking in the right directory!

1 Like

here is the explanation of how the process works: https://expo.fyi/eas-build-archive

1 Like