When creating a DX Unlocked Package version from a DevHub org and user with Second Generation Packages Enabled (1h ago)

sfdx force:package:version:create -p "myapp" -x -json 

I get the following errors:

ERROR running force:package:version:create: No such column 'Instance' on sobject of type Package2VersionCreateRequest

Try this: Your org does not have permission to specify a build instance for your package version. Verify that you are authenticated to the desired org and try again. Otherwise, contact Salesforce Customer Support for more information.

When I call the command without the -json param it takes a minute and then comes back with other metadata errors that all seem to miss a custom object which is part of the package.

ERROR running force:package:version:create: TestQuoteCtrl: Invalid type: MyQuote__c,TestMyQuoteCtrl: Invalid type: MyLineItem__c,QuoteManager: Invalid type

2 Answers 2


My solution was two-fold:

  1. Don't use the -json parameter as it doesn't print the real root causes
  2. As many documentations and blogs about this topic I forgot to specify the -f parameter in my version create command. If omitted the version is created from a default scratch org which in my case was incompatible with some metadata settings.

    sfdx force:package:version:create -p my-app -d force-app --wait 10 -v DevHub -x -f config/project-scratch-def.json

  • cool, another possibility is if you use Permission Sets and your Admin profile doesn't have all permissions specified
    – ytiq
    Commented Mar 15, 2021 at 12:12

There is no such a parameter as -json, but --json


sfdx force:package:version:create [--json] [--loglevel LOGLEVEL] [-v TARGETDEVHUBUSERNAME] [--apiversion APIVERSION] [-p PACKAGE] [-d PATH] [-f DEFINITIONFILE] [-b BRANCH] [-t TAG] [-k INSTALLATIONKEY] [-x] [-w WAIT] [-a VERSIONNAME] [-n VERSIONNUMBER] [-e VERSIONDESCRIPTION] [-c] [--releasenotesurl RELEASENOTESURL] [--postinstallurl POSTINSTALLURL] [--postinstallscript POSTINSTALLSCRIPT] [--uninstallscript UNINSTALLSCRIPT] [--skipvalidation]

You must log in to answer this question.

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