0

NOTE:org-dependent

I am creating an org-dependent unlocked package with the following:

sfdx force:package:create --name TestApp1 --description "TestApp1" --packagetype Unlocked --path force-app --nonamespace --orgdependent --targetdevhubusername DevHub

I am not using a scratch org. I get the command: sfdx-project.json has been updated. Successfully created a package. 0Ho12300000TN4YXYZ

How do I get the install url for this? I tried : sfdx force:package:version:create:report -i 0Ho12300000TN4YXYZ

I get the error:

The Package Version Create Request Id: 0Ho12300000TN4YXYZ isn't defined in the sfdx-project.json. Add it to the packageDirectories section and add the alias to packageAliases with its 08c ID.

My sfdx-project.json

{
    "packageDirectories": [
        {
            "path": "force-app",
            "package": "TestApp",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "default": true
        },
        {
            "path": "force-app",
            "package": "TestApp1",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "default": false
        }
    ],
    "namespace": "TestApp",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "50.0",
    "packageAliases": {
        "TestApp": "0Ho12340000TN3kXYZ",
        "TestApp1": "0Ho12300000TN4YXYZ"
    }
}
1

Packages are containers, so to speak, for package versions. Package versions are what you install. Their ids start with 04t, rather than the 0Ho of the containing package.

You haven't uploaded a package version yet. You need to do so using the force:package:version:create command, which you can status-check using force:package:version:create:report. Once you have an 04t package version Id, you can install it in an org with force:package:install --package <04t id>.

1
  • Thanks David this resolved my issue. – Thomas Feb 11 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.