Skip to content

installPackageDependencies

installPackageDependencies(options): Promise<PackageToInstall[]>

Defined in: simply-package-core/src/packageDependenciesInstall.ts:635

Installs the package dependencies an SFDX project declares in sfdx-project.json into an org, one at a time in declaration order, and reports what happened to each.

Dependencies are resolved to SubscriberPackageVersionIds (via the project’s aliases, or the Dev Hub for package + versionNumber pairs), de-duplicated, compared against what the org already has per installType, and then installed with the retry policy given. Every dependency’s outcome — including the ones skipped — is returned, so a caller can tell which installs were upgrades of an existing package.

Progress is reported through options.progress; confirmations go through options.prompts, or are auto-approved when that’s omitted.

InstallPackageDependenciesOptions

See InstallPackageDependenciesOptions.

Promise<PackageToInstall[]>

One entry per resolved dependency, in the order they were processed.

ApiVersionTooLowError if the target org’s API version is below 36.0.

InvalidSubscriberPackageVersionIdError if a dependency, installation key, or retry override doesn’t resolve to a 04t id.

InvalidPackage2IdError if a package + versionNumber dependency doesn’t resolve to a 0Ho id.

TargetDevHubMissingError if a dependency needs the Dev Hub and none was given.

PackageInstallCanceledError if prompts.confirmUpgradeTypeDelete declined.

PackageInstallInProgressError if an install was still in progress when polling timed out.

PackageInstallError if an install failed and its retries (if any) are exhausted.