0

I'm trying to create an unlocked package for all custom objects, custom fields, page layouts. Creating the package itself is going well, but when I tried to create a version, it failed with a very long list of errors!

I read them, and it seems that for some of the errors the problem is that when creating a version some features like (PersonAccount, ...etc) are not found

here is a link to the full list of errors: https://justpaste.it/2o71t

these are some of the errors:

Account: The entity: Account does not have history tracking enabled,CaseMilestone: Invalid fullName, must end in a custom suffix ( for ex. __c ),AccountContactRelation: Invalid fullName, must end in a custom suffix ( for ex. __c ),MLModel: Invalid fullName, must end in a custom suffix ( for ex. __c ),ForecastingTypeToCategory: Invalid fullName, must end in a custom suffix ( for ex. __c ),Entitlement: Invalid fullName, must end in a custom suffix ( for ex. __c ),Case.SlaExitDate: Could not resolve standard field's name.,Case.SlaStartDate: Could not resolve standard field's name.,Case.SourceId: fullName must end with: __c or __kav or __x or __b or __xo or __e or __p or __mdt,DuplicateRecordSet: Invalid Type Exception,ForecastingOwnerAdjustment: Invalid fullName, must end in a custom suffix ( for ex. __c

  • Are you using Scratch Orgs? You need to setup the configurations for the Scratch Org so that these different features are enabled – Brian Miller Apr 28 at 8:55
  • I used the Close/Duplicate Vote to link this question to another that explains what the problem is. You need to use the Metadata Coverage Report to determine which features you need to enable. The file itself should be a JSON file that describes the dependencies, and the sfdx-project file should contain a reference to this configuration file. – sfdcfox Apr 28 at 10:03
  • I'm really new to the whole unlocked packages thing. Why do I need a scratch org to create a package of some metadata, which are locally saved in my laptop? – Mo Hamada Apr 28 at 10:06
  • @sfdcfox? could you answer my question above? – Mo Hamada Apr 29 at 5:40
  • @MoHamada You don't need a scratch org to create the version. However, when creating a package, the platform, by default, assumes that the package should be installable into a brand new org that has the default configuration. If you need additional features, let's say, Account Team Members, you have to specify that as a dependency for your package. Any time the package is installed in an org, the platform will check to make sure that those features are enabled, or fail the installation. – sfdcfox Apr 29 at 13:01