1

UPDATE: Facing the same issue even without package dependency.

I am trying to promote a Pkg2 with a dependent package Pkg1. Both packages are 2nd generation manage package in the same namespace. I am able to create the Beta package with dependency but when running sfdx force:package:promote it shows following error:

The Subscriber Package Version Id or Package Version Id: 0HoXXXXXXXXXXXXXXX isn't defined in the sfdx-project.json. Add it to the packageDirectories section and add the alias to packageAliases with its 04t or 05i ID.

Following is my sfdx-project.json file.

{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true,
            "package": "Pkg2",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "dependencies": [
                {
                    "package": "Pkg1",
                    "versionNumber": "0.2.0.LATEST"
                }
            ]
        }
    ],
    "namespace": "MyNameSpace",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "48.0",
    "packageAliases": {
        "Pkg1": "0HoXXXXXXXXXXXXXXX",
        "Pkg2": "0HoXXXXXXXXXXXXXXX",
        "Pkg2@0.1.0-1": "04t7F000005EwwvQAC"
    }
}

Any help is appreciated. Thanks

  • I am also facing same issue today. Please let me know if you find any solution for it. – Pranav Chitrans Apr 30 at 8:22
  • Could you please specify which package version is mentioned in the error? Pkg2 or Pkg1? – nchursin Apr 30 at 16:46
  • It is Pkg2 @blank – Sushant Srivastava Apr 30 at 16:47
  • From id or seems like you're passing package id, where sfdx expects version id (-p parameter). Also, AFAIU you meant command force:package:version:promote – nchursin Apr 30 at 16:59
  • 1
    You need to use version id, not package id or alias in -p parameter. Try -p 04t7F000005EwwvQAC – nchursin Apr 30 at 17:28
0

Though documentation says -p received package id, you need to use version id. So, in your case that would be -p 04t7F000005EwwvQAC

| improve this answer | |

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.