pulumi/pulumi · error

the bun runtime requires @pulumi/pulumi >= %s, but %s is ins

Error message

the bun runtime requires @pulumi/pulumi >= %s, but %s is installed; ensure all copies of @pulumi/pulumi are updated to >= %s and re-run `pulumi install`

What it means

When runtime is bun, the language host enforces a minimum @pulumi/pulumi SDK version (minBunPulumiSDKVersion) because bun support relies on newer SDK features. It scans installed @pulumi/pulumi packages (including transitive copies) and fails the deployment if any resolved version is older than the minimum.

Source

Thrown at sdk/nodejs/cmd/pulumi-language-nodejs/main.go:441

		return fmt.Errorf("could not resolve package manager: %w", err)
	}

	packages, err := pm.ListPackages(ctx, programDirectory, true /*transitive*/)
	if err != nil {
		logging.V(5).Infof("skipping @pulumi/pulumi version check: %v", err)
		return nil
	}

	for _, pkg := range packages {
		if pkg.Name == "@pulumi/pulumi" {
			v, err := semver.Parse(pkg.Version)
			if err != nil {
				logging.V(5).Infof("skipping @pulumi/pulumi version check: could not parse version %q: %v",
					pkg.Version, err)
				continue
			}
			if v.LT(minBunPulumiSDKVersion) {
				return fmt.Errorf("the bun runtime requires @pulumi/pulumi >= %s, but %s is installed; "+
					"ensure all copies of @pulumi/pulumi are updated to >= %s and re-run `pulumi install`",
					minBunPulumiSDKVersion, v, minBunPulumiSDKVersion)
			}
		}
	}

	logging.V(5).Info("skipping @pulumi/pulumi version check: package not found in lockfile")
	return nil
}

func compatibleVersions(a, b semver.Version) (bool, string) {
	switch {
	case a.Major == 0 && b.Major == 0:
		// If both major versions are pre-1.0, we require that the major and minor versions match.
		if a.Minor != b.Minor {
			return false, "Differing major or minor versions are not supported."
		}

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Run `pulumi install` in the program directory so all copies of @pulumi/pulumi update to >= the required version
  2. Bump the @pulumi/pulumi dependency in package.json to the latest and regenerate the lockfile (bun install)
  3. Check for transitive dependencies pinning an old @pulumi/pulumi and update/override them

Example fix

// before (package.json)
"dependencies": { "@pulumi/pulumi": "3.80.0" }
// after
"dependencies": { "@pulumi/pulumi": "^3.113.0" }
// then run: pulumi install
Defensive patterns

Strategy: validation

Validate before calling

// pre-flight check before pulumi up with bun
execSync("bun pm ls | grep @pulumi/pulumi"); // confirm installed versions meet the CLI minimum

Try / catch

try {
  await pulumiUp();
} catch (err) {
  if (String(err).includes("requires @pulumi/pulumi >=")) {
    execSync("pulumi install", { cwd: programDir });
    await pulumiUp();
  } else { throw err; }
}

Prevention

When it happens

Trigger: Running `pulumi up` with runtime: bun while node_modules contains @pulumi/pulumi older than the required minimum — typically because `pulumi install` hasn't been re-run since upgrading the CLI, or a transitive dependency pins an old version.

Common situations: Upgrading the Pulumi CLI to a version raising minBunPulumiSDKVersion without reinstalling; a nested dependency depending on an old @pulumi/pulumi; lockfile pinning stale versions; multiple copies in node_modules with one stale.

Related errors


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/015c86552218c8e3. Report an issue: GitHub.