2

We're trying to deploy our package.xml to a scratch org for testing.

We're encountering this error:

Error sdx_sourceDeploy_1590769531369/flexipagesMyPage_Layout.flexipage The c:MyComponent component is from a managed package, and must be marked 'access=global' to be used on this Lightning page.

This error message is quite poor, because:

  • This isn't a managed package, it's an unmanaged package we are deploying with -x manifest/package.xml
  • This component is already marked as global:
<aura:component
    controller="MyComponentController"
    implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes"
    access="global"
>

What else could be causing this error?

1
  • By the way, this component has aura:attributes in it, and I've added access=global to those, but same error in a new scratch org
    – Andy Ray
    Commented Jun 2, 2020 at 4:09

1 Answer 1

2

The reason for this ended up being the component was depending on another piece of invalid metadata. Because Salesforce only returns a few metadata errors instead of all of them, it took a while for us to find the underlying issue.

So the error isn't actually checking for access global, it just thinks it can't find the component because it has an error. Combined with Salesforce's poor error reporting, it was not obvious what the issue was.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .