oven-sh/bun · error · Error

Unsupported package manager

Error message

Unsupported package manager: ${packageManager}

What it means

Guard in the vendor-test runner: an entry in vendor.json declares a packageManager other than "bun", and the install step only knows how to install dependencies with Bun. The vendor entry's packageManager field must be "bun" (or the entry removed).

Solutions

  1. Set "packageManager": "bun" for the vendor entry in test/vendor.json
  2. Add support for the package manager in runner.node.mjs if genuinely needed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/runner.node.mjs:1191 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/d7f0894f6e21b92b. Report an issue: GitHub.

Appendix: source

Thrown at scripts/runner.node.mjs:1191

      startGroup(`Running ${parallelSafeTests.length} parallel-safe tests (${parallelSafeWidth}-wide)`);
    }
    await Promise.all(parallelSafeTests.map(t => parallelSafeLimit(() => runOneTest(t, parallelSafeWidth > 1))));
  }

  if (vendorTests?.length) {
    for (const { cwd: vendorPath, packageManager, testRunner, testPaths } of vendorTests) {
      if (!testPaths.length) {
        continue;
      }

      const packageJson = join(relative(cwd, vendorPath), "package.json").replace(/\\/g, "/");
      if (packageManager === "bun") {
        const { ok } = await runTest(packageJson, () => spawnBunInstall(execPath, { cwd: vendorPath }));
        if (!ok) {
          continue;
        }
      } else {
        throw new Error(`Unsupported package manager: ${packageManager}`);
      }

      // build
      const buildResult = await spawnBun(execPath, {
        cwd: vendorPath,
        args: ["run", "build"],
        timeout: 60_000,
      });
      if (!buildResult.ok) {
        throw new Error(`Failed to build vendor: ${buildResult.error}`);
      }

      for (const testPath of testPaths) {
        const title = join(relative(cwd, vendorPath), testPath).replace(/\\/g, "/");

        if (testRunner === "bun") {
          await runTest(title, index =>
            spawnBunTest(execPath, testPath, { cwd: vendorPath, env: { TEST_SERIAL_ID: index } }),

View on GitHub (pinned to 8c5296ac45)