engine icon indicating copy to clipboard operation
engine copied to clipboard

yarn.lock is removed on every PR made by the contember studio, causing Yarn workspace resolution errors

Open NotSugat opened this issue 8 months ago • 2 comments

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).
  • cms is a standalone subproject and not a workspace.
  • To make Yarn recognize cms as an isolated project, a local yarn.lock file 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

Image


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


NotSugat avatar Apr 05 '25 13:04 NotSugat