Skip to content

getMetadata does not support monorepo #2037

@ahiyalala

Description

@ahiyalala

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogIssue/PR/discussion is reviewed and added to backlog for the further work🐞 bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions