0

I'm looking for people who had a similar problem before.

It's our first time generating a package. When I try to do it, via:

sfdx force:package:version:create --package "X" --installationkey onekey

I got this message:

Can’t create patch version. Log a case in the Salesforce Partner Community and request that patch versioning be enabled in the org where you created the namespace for this package.

Obviously, I tried that but after 9 days I still didn’t get an answer.

Any thoughts on this? Is there anything else I can do by myself?

Thanks.

4
  • What kind of package version are you trying to create? What kind of package is this? What does your sfdx-project.json look like?
    – sfdcfox
    Commented Dec 2, 2020 at 0:57
  • The message indicates that it tries to create a patch version of the package. Is this your intention? Check the version number in the project configuration file. The documentation does mention you need to raise a case to enable patch versioning.
    – Chun
    Commented Dec 2, 2020 at 0:58
  • Thanks for commenting guys. It's a managed package. I first create a package following the docs: developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/… Got a package Id. And now, I'm trying to create a version, like here: developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/… Maybe I have one wrong version number? Commented Dec 2, 2020 at 16:45
  • I changed to "versionNumber": "0.0.1", now I'm getting "VersionNumber must be in the format major.minor.patch.build but the value found is [0.0.1]." Commented Dec 2, 2020 at 16:55

2 Answers 2

1

Following @sfdcfox and @Chun tips, I figured out a few things:

  1. For some reason, the version number must start with >1;
  2. The docs mention a pattern "major.minor.patch", but the CLI requires a "major.minor.patch.build" pattern;
  3. If you use a versionNumber like "0.0.0.1" you got that message to raise a case, even if it's your first release;
  4. I just changed the versionNumber field to "1.0.0.0" and I was able to create a version, finally.

Thanks.

0

If you want to create a package version by raising the patch number, you need to raise a case with Salesforce support as suggested by the error message (see https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_dev_dev2gp_create_patch_version.htm).

In case it's your first release, it needs to be at least a minor version number, e.g. 0.1.0.0.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .