0

I have below JSON file having more than one package dependency link to single package.

When a package has single dependency it executed without error but if a package has two dependency I am getting error on second dependent package metadata.

I am getting following error over the command 'package88Outbound' has two dependency

Command:

sfdx force:package:version:create --package "package88Outbound" --installationkey “package88” --wait 10

Error:

Type is not visible:

{
     "packageDirectories": [
         {
             "path": "schema-pack",
             "default": true,
             "package": "package88Schema",
             "versionName": "ver 0.1",
             "versionNumber": "0.1.0.NEXT"
         },
         {
             "path": "common-pack",
             "default": false,
             "package": "package88Common",
             "versionName": "ver 0.1",
             "versionNumber": "0.1.0.NEXT",
             "dependencies": [
                 {
                     "package": "schema-pack",
                     "versionNumber": "0.1.0.LATEST"
                 }
             ]
         },
         {
             "path": "outbound-pack",
             "package": "package88Outbound",
             "versionName": "ver 0.1",
             "versionNumber": "0.1.0.NEXT",
             "default": false,
             "dependencies": [
                 {
                     "package": "schema-pack",
                     "versionNumber": "0.1.0.LATEST"
                 },
                 {
                     "package": "common-pack",
                     "versionNumber": "0.1.0.LATEST"
                 }
             ]
         },
         {
             "path": "inbound-pack",
             "default": false,
             "package": "package88Inbound",
             "versionName": "ver 0.1",
             "versionNumber": "0.1.0.NEXT",
             "dependencies": [
                 {
                     "package": "schema-pack",
                     "versionNumber": "0.1.0.LATEST"
                 },
                 {
                     "package": "common-pack",
                     "versionNumber": "0.1.0.LATEST"
                 }
             ]
         },
         {
             "path": "visual-pack",
             "default": false,
             "package": "package88Visual",
             "versionName": "ver 0.1",
             "versionNumber": "0.1.0.NEXT",
             "dependencies": [
                 {
                     "package": "schema-pack",
                     "versionNumber": "0.1.0.LATEST"
                 },
                 {
                     "package": "common-pack",
                     "versionNumber": "0.1.0.LATEST"
                 }
             ]
         }
     ],
     "namespace": "package88**",
     "sfdcLoginUrl": "https://login.salesforce.com",
     "sourceApiVersion": "49.0",
     "packageAliases": {
         "package88Schema": "0Ho88********",
         "package88Common": "0Ho88********",
         "package88Outbound": "0Ho88********",
         "package88Inbound": "0Ho88********",
         "package88Visual": "0Ho88********",
         "package88Schema@0.1.0-2": "0Ho88********"
     }
    }
1

I think your JSON is not correct. Whatever dependencies mentioned, shall be present in the packageAliases with 04t***** IDs.

Please check the good article on that - https://sfdc-db-gmail.github.io/unlocked-packages/faq-unlocked-pkgs.html#complex-pkg-deps

Please try to create a JSON like this -

{
    "packageDirectories": [{
            "path": "schema-pack",
            "default": true,
            "package": "package88Schema",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "dependencies": [{
                "package": "schema-pack",
                "versionNumber": "0.1.0.LATEST"
            }]
        },
        {
            "path": "visual-pack",
            "default": false,
            "package": "package88Visual",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "dependencies": [{
                    "package": "schema-pack",
                    "versionNumber": "0.1.0.LATEST"
                },
                {
                    "package": "common-pack",
                    "versionNumber": "0.1.0.LATEST"
                }
            ]
        }
    ],
    "namespace": "package88**",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "49.0",
    "packageAliases": {
        "package88Schema": "0Ho88********",
        "package88Visual": "0Ho88********",
        "schema-pack": "04t88********",
        "common-pack" : "04t**********"
    }
}
0

it was my mistake forgot to add @namespaceAccessible annotation referenced depending package.

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.