0

I am trying to make a version of my package but it fails every time.

I am able to create a scratch org, install package dependencies, and push my source code successfully. But when I go to create a version of the package, I get the following error:

ERROR running force:package:version:create:  Unable to parse package2-descriptor.json: invalid attribute 'versionNumber'

I canot find package2-description.json in my directory structure and don't know what info is missing.

{
  "packageDirectories": [
{
  "path": "force-app",
  "default": true,
  "package": "nllg-base",
  "versionName": "Fall 2019",
  "versionNumber": "1.0.0.NEXT",
  "dependencies": [
      {
          "package": "advpm",
          "versionNumber": "1.86.0.LATEST"
      },
      {
          "package": "pdpamm",
          "versionNumber": "1.55.0.LATEST"
      }
    ]
  }
 ],
 "namespace": "",
 "sfdcLoginUrl": "https://login.salesforce.com",
 "sourceApiVersion": "46.0",
 "packageAliases": {
   "nllg-base" : "0HoXXXXXXXXX",
   "advpm": "04tXXXXXXXXXXXXXXX",
   "pdpamm": "04tXXXXXXXXXXXXXXX"
  }
}

Using the following command

sfdx force:package:version:create -w 10 -v alias -p nllg-base -k key
0

First off, the error message was misleading. A Salesforce developer helped me understand that the tooling api has a slightly different set of configurations, and that is why the package2-description.json was mentioned, even thought it has nothing to do with my sfdx project.

Second "If you are going to specify a dependent package by the 04t ID, then do not also use the versionNumber attribute. The 04t value point at a specific version already. You should only specify the versionNumber attribute when you are referencing a 0Ho value (which will also be from your specific dev hub) and then you can request a specific version since your dev hub has the version info" reference

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.