jss icon indicating copy to clipboard operation
jss copied to clipboard

getMetadata does not support monorepo

Open ahiyalala opened this issue 10 months ago • 1 comments

Describe the Bug

For monorepo projects that uses turborepo for example, getMetadata does not allow for retrieving the whole list of sitecore dependencies due to the line:

queryResult = JSON.parse(execSync('npm query [name*=@sitecore] **--workspaces false**').toString())

This either left metadata.json empty {} or only contains an incomplete set of packages.

To Reproduce

Run npm run start:connected on a monorepo-based project

Expected Behavior

metadata.json should contain the list of required packages

Possible Fix

Remove --workspaces false parameter in the getMetadata npm command

Provide environment information

  • Sitecore Version: XM Cloud
  • JSS Version: 22.1
  • Browser Name and version: Edge
  • Operating System and version (desktop or mobile): Windows 11
  • Link to your project (if available): N/A

ahiyalala avatar Feb 07 '25 12:02 ahiyalala

Thanks for the submission, I am adding an item in our backlog to work on fixing this.

yavorsk avatar Feb 11 '25 11:02 yavorsk