0

So to set up status!

Package is unmanaged and has namespace which i reserved on dev org which i connected to my DevHub org.

I did create package itself but when i try to create package version with this:

sfdx force:package:version:create -k "password" -w 40 -p "mypackageID"

and after 2 to maks 4 min i get this error:

Sie können kein nicht gesperrtes Paket ohne Namespace in einer Organisation mit Namespace installieren

Can't really find a way to work with this one.

Here is package definition file:

{
  "sourceApiVersion": "45.0",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "namespace": "amsHRR",
  "packageDirectories": [
      {
          "definitionFile": "config/project-scratch-def.json",
          "package": "HRProcessesSupportApp",
          "default": true,
          "versionNumber": "0.0.0.NEXT",
          "dependencies": [
              {
                  "package": "Propel",
                  "subscriberPackageVersionId": "packageID"
              },
              {
                  "package": "ZeroStateAMSApp",
                  "subscriberPackageVersionId": "packageID"
              }
          ],
          "versionName": "Version 0.0",
          "path": "force-app"
      }
  ],
  "packageAliases": {
      "Propel": "04t1S000000XzOQQA0",
      "ZeroStareAMSApp": "packageID",
      "ZeroStareAMSApp@0.0.0-1": "packageID",
      "HRProcessesSupportApp": "packageID"
  }
}

Please tell me what is the problem?

1

One of your dependencies (ZeroStateAMSApp, or Propel) must be an Unlocked package with no namespace. And you're trying to build a package with a namespace.

I don't speak German, but google says your error message is:

You can not install an unlocked package with no namespace in a namespace organization

So, you must build a version of the Unlocked package dependency (ZeroStateAMSApp, or Propel) using the same namespace as you're targeting here (amsHRR).

One of the great things about second generation packaging is that you can build multiple packages in the same namespace. And you can use the same source code to build different flavours of the same package. So, you can just check out the code for ZeroStateAMSApp and/or Propel, then add the namespace to their project file and build a namespaced package version.

  • uuuuuuuu I see ... But this is problematic. Cause ZeroStateAMSApp is my coppy of production status i used to close what is there in to package. If i include it in to the namespace it will not include what is on production cause it will now have this prefix. – Marcin Trofiniak Mar 28 at 15:05
  • Or is it possiable for me to add namespace now to that package? – Marcin Trofiniak Mar 28 at 15:12
  • 1
    It sounds like your trying migrate an existing org to unlocked packages? And using namespaces at the same time? That's not really recommended, because of these sorts of problems. If you're just making an existing org modular, I'd just not use namespaces at all. – Aidan Mar 28 at 16:31
  • So maybe i will ask different question. Is it possiable to enclose metadata that is on production already in to package with namespace ? – Marcin Trofiniak Mar 29 at 8:55
  • Cause my problem is that i wanted to enclose the basic setting of production in package to be able tobuild new packags up on it. So i did read that if you want to enclose existing things in package you shouldn't use name space. But no when i want to develope new things i did think that namespace would be usefull this time... Yet ... now i can;t use my basic package which i have already on production ... :P How should i procide my dear @Aidan – Marcin Trofiniak Mar 29 at 9:12

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.