1

When I run the CLI command force:package:version:create I get this error:

Packaging is not enabled on this org. Verify that you are authenticated to the desired org and try again.

The org I'm trying to create this package in, is a full sandbox org.

1 Answer 1

2

You need to create packages and package versions in a Dev Hub-enabled org, which must be a production or Developer Edition org. You cannot create Second Generation Packages in a Sandbox. If you don't want to keep the version, you can later delete it. Note that creating a new version does not install the package; no changes are made to your production metadata until you later install the package version.

4
  • Thanks @sfdcfox!! So does this mean that I have to create the package and its version in my production org (which is my Dev Hub enabled org) and then install that package in a sandbox to test it?
    – Bahman.A
    Apr 29, 2021 at 18:20
  • 1
    @Bahman.A That's exactly correct.
    – sfdcfox
    Apr 29, 2021 at 18:39
  • Thanks! One more confusion I have here is that, how can I move this package into my sandbox to install it if it's going to be living in my production org?
    – Bahman.A
    Apr 29, 2021 at 18:44
  • 2
    @Bahman.A You don't "move" it, you install it (force:package:install). You can install a package in any org you're authenticated with as admin.
    – sfdcfox
    Apr 29, 2021 at 18:45

You must log in to answer this question.

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