oven-sh/bun · error · Error

Did not find vendor.json

Error message

Did not find vendor.json: ${vendorPath}

What it means

Thrown by getVendorTests when test/vendor.json — the manifest listing third-party projects to run as vendor tests — does not exist in the checkout. The repository state is incomplete or the runner was pointed at the wrong cwd.

Solutions

  1. Run the runner from the repository root so test/vendor.json resolves
  2. Restore test/vendor.json if it was deleted
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at scripts/runner.node.mjs:2371

 * @property {boolean | Record<string, boolean | string>} [skipTests]
 */

/**
 * @typedef {object} VendorTest
 * @property {string} cwd
 * @property {string} packageManager
 * @property {string} testRunner
 * @property {string[]} testPaths
 */

/**
 * @param {string} cwd
 * @returns {Promise<VendorTest[]>}
 */
async function getVendorTests(cwd) {
  const vendorPath = join(cwd, "test", "vendor.json");
  if (!existsSync(vendorPath)) {
    throw new Error(`Did not find vendor.json: ${vendorPath}`);
  }

  /** @type {Vendor[]} */
  const vendors = JSON.parse(readFileSync(vendorPath, "utf-8")).sort(
    (a, b) => a.package.localeCompare(b.package) || a.tag.localeCompare(b.tag),
  );

  const shardId = parseInt(options["shard"]);
  const maxShards = parseInt(options["max-shards"]);

  /** @type {Vendor[]} */
  let relevantVendors = [];
  if (maxShards > 1) {
    for (let i = 0; i < vendors.length; i++) {
      if (i % maxShards === shardId) {
        relevantVendors.push(vendors[i]);
      }
    }

View on GitHub (pinned to 8c5296ac45)