I am trying to release an Unlocked 2GP package that has an Unlocked package dependency (UnofficialSF component), and when SF servers verify the dependencies I get the same error every time:
Error: You cannot install an unlocked package without a namespace into an org with a namespace.
It is my understanding that 2GP does NOT use any sort of packaging org (which would have been namespaced) to build the package, so I'm not sure what namespaced org this is flagging an error for. I have scoured SFDX's documentation as well as user forums and can't find anyone dealing with this same error.
I have tried releasing a package version using both CLI and CumulusCI, and I get the same error in both scenarios.
When listing packages in my Dev Hub:
Namespace Prefix Name Id Alias Description Type
ref02 Refugees-Support-Unlocked 0Ho1U000000TNSaSAO Unlocked
For those familiar with CumulusCI the beginning of my CCI.yml file looks like:
project:
name: Refugees-Support
package:
name: 'Refugees-Support-Unlocked'
namespace: 'ref02'
api_version: '50.0'
dependencies:
- github: 'https://github.com/SalesforceFoundation/PMM'
- github: 'https://github.com/SalesforceFoundation/Relationships'
- version_id: 04t4W00000309DuQAI
- version_id: 04t5G0000047xO4QAI
- version_id: 04t5G000003rUaWQAU
My prior sfdx-project file looked like this, for when running the release via SFDX CLI:
"namespace": "ref02",
"sourceApiVersion": "52.0",
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "Refugees Support (Unlocked)",
"versionName": "ver 0.1",
"versionNumber": "0.1.0.NEXT",
"definitionFile" : "orgs/release.json"
}
],
"dependencies": [
{
"package" : "Relationships@3.12.0.LATEST"
},
{
"package": "PMM@1.29.0.LATEST"
},
{
"package": "FlowActionsBasePack@2.36.0.LATEST"
},
{
"package": "FlowScreenComponentsBasePack@2.7.5.LATEST"
},
{
"package": "Datatable@3.3.2.LATEST"
}
],
"postInstallUrl": "https://github.com/Cath-Strategic-Tech/Refugees-Support/releases",
"packageAliases": {
"PMM": "04t6g000008C2xMAAS",
"Relationships": "04t2E000003sm94QAA",
"FlowActionsBasePack": "04t4W0000034KcuQAE",
"FlowScreenComponentsBasePack": "04t5G0000047xO4QAI",
"Datatable": "04t5G000003rUaWQAU",
"Refugees Support (Unlocked)": "0Ho1U000000TNSQSA4"
}
}
My sfdx-project when attempting the run via CumulusCI looks pretty simple:
{"packageDirectories": [{"path": "force-app", "default": true}], "namespace": null, "sourceApiVersion": "52.0"}