Newer Version Available
Enable Second-Generation Packaging
Enable Second-Generation Packaging (2GP) in your org so you can develop unlocked
packages (generally available) or managed packages (beta). You can work with the packages in
scratch orgs, sandbox orgs, and target subscriber orgs.
Enable Dev Hub in your org.
- Log in to the org where you’ve enabled Dev Hub.
- From Setup, enter Dev Hub in the Quick Find box and select Dev Hub.
- In the section for Second-Generation Packaging, click Non-GA Service Agreement to read the service agreement.
-
Click Enable Unlocked Packages (GA) and Second-Generation Managed Packages
(Beta).
After you enable Second-Generation Packaging, you can’t disable it.
-
(Optional) Allow non-admin users to access the Dev Hub to create packages.
Assign non-admin users the Create and Update Second Generation Packages user permission. See Add Salesforce DX Users for details.