0

Package A is installed in Devhub

Some code is taken out of package A and a package B version is created from it (not installed)

Newest package A version is made dependent on the same package B version that was just created

All good and no issues with version creation of A or B

And then if:

Package C is dependent on Package A.

Some code is moved out of Package A and moved to Package C.

Able to create package A version.

When I try creating package C which is dependent on the package A version just created I get:

ERROR running force:package:version:create:  An error occurred while trying to install a package dependency, ID 04t6R0000011Os5: The package you're installing depends on package 'B', version '1.0'. Install package 'B' in the target org before you install package 'A'.

(using A.B.C for simplicity purposes only)

Why it it enforcing installation of a package in the org when all I am doing is creating a version that is dependent on other versions only?

1 Answer 1

1

You'll need to specify package b as an additional dependency to package c in order for everything to work correctly. All dependencies must be explicitly listed in order of dependency in order to complete a package version.

2
  • Listing package B as a dependency in project C project.json followed by the dependency to project A results in the same message: An error occurred while trying to install a package dependency, ID 04t6R0200011Os5: The package you're installing depends on package 'B', version '1.0'. Install package 'B' in the target org before you install package 'A'. Why is target org needed for version creation? @sfdcfox Sep 5, 2021 at 21:52
  • My bad. My sfdx-project json syntax was off for multiple dependencies. So basically no automatic dependency management but it needs to be listed out explicitly. Thank you as always. Sep 5, 2021 at 22:10

You must log in to answer this question.

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