yarn.lock is removed on every PR made by the contember studio, causing Yarn workspace resolution errors
I've recently encountering a recurring issue where every time Contember AI Studio makes a pull request, it removes the yarn.lock file in the cms directory.
This leads to the following Yarn workspace resolution error when attempting to install dependencies:
Usage Error: The nearest package directory (/home/user/coding/contember/cms) doesn't seem to be part of the project declared in /home/user/coding/contember.
Project Context
- the project uses Yarn v4 workspaces at the root (
/contember). -
cmsis a standalone subproject and not a workspace. - To make Yarn recognize
cmsas an isolated project, a localyarn.lockfile is required inside that folder. - I’ve manually added
cms/yarn.lock, which resolves the issue successfully for both local development and CI builds.
Problem
Every time Contember AI Studio makes a pull request, the cms/yarn.lock file is removed, even though it is:
- Required for Yarn to function properly in
cms - Committed and tracked in Git
- Not listed in
.gitignore
As a result, yarn install breaks in the cms directory after each automated PR, blocking development
Expected Behavior
The cms/yarn.lock file should be preserved in all pull requests, including those generated automatically by Contember AI Studio.
Let me know if a reproduction example is needed
Hi! Thanks for flagging this — and great catch!
This behavior is actually due to how Contember AI Studio prepares and pushes changes. Internally, it's using Bun to manage dependencies and generate the codebase, and since Yarn isn’t involved in the Studio environment, the local yarn.lock file ends up being omitted during automated PRs.
You're absolutely right that this file is essential for dependency resolution in the project — and we agree it should be preserved.
We’ve already planned a fix on our end to make sure .lock files like this are retained automatically when Studio creates a pull request. In the meantime, if you hit this issue again, re-adding the yarn.lock file manually should unblock you.
Thanks again for reporting this!
Thank you for looking into the issue!