oven-sh/bun · error · Error

Vendor ' ' does not have a package.json

Error message

Vendor '${name}' does not have a package.json: ${packageJsonPath}

What it means

Guard after clone/checkout: the vendored repository has no package.json at its root, so dependencies cannot be installed and tests cannot be run. Either the repo layout changed or the vendor entry points at the wrong project.

Solutions

  1. Point the vendor entry at a repository/tag that ships a root package.json
  2. Skip the vendor if its tests no longer apply
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/runner.node.mjs:2427 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/c095fef3a89c332e. Report an issue: GitHub.

Appendix: source

Thrown at scripts/runner.node.mjs:2427

        let { ok, error } = await spawnSafe({
          command: "git",
          args: ["fetch", "--depth", "1", "origin", "tag", tag],
          timeout: testTimeout,
          cwd: vendorPath,
        });
        if (!ok) throw new Error(`failed to fetch tag ${tag} for vendor '${name}': ${error}`);

        ({ ok, error } = await spawnSafe({
          command: "git",
          args: ["checkout", tag],
          timeout: testTimeout,
          cwd: vendorPath,
        }));
        if (!ok) throw new Error(`failed to checkout tag ${tag} for vendor '${name}': ${error}`);

        const packageJsonPath = join(vendorPath, "package.json");
        if (!existsSync(packageJsonPath)) {
          throw new Error(`Vendor '${name}' does not have a package.json: ${packageJsonPath}`);
        }

        const testPathPrefix = testPath || "test";
        const testParentPath = join(vendorPath, testPathPrefix);
        if (!existsSync(testParentPath)) {
          throw new Error(`Vendor '${name}' does not have a test directory: ${testParentPath}`);
        }

        const isTest = path => {
          if (!isJavaScriptTest(path)) {
            return false;
          }

          if (typeof skipTests === "boolean") {
            return !skipTests;
          }

          if (typeof skipTests === "object") {

View on GitHub (pinned to 8c5296ac45)