jss
jss copied to clipboard
getMetadata does not support monorepo
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
Thanks for the submission, I am adding an item in our backlog to work on fixing this.