oven-sh/bun · error · Error

Mismatch

Error message

Mismatch

What it means

While mapping a package id back to a dependency id, no entry in the resolutions buffer references that package (src/install/lockfile/Buffers.rs:370-391) - the resolution data does not cover the package list, i.e. an internally inconsistent lockfile.

Source

Thrown at bench/scanner/scan.bun.js:16

import { readFileSync } from "fs";
const fixture = ["action", "default", "loader"];
const ITERATIONS = parseInt(process.env.ITERATIONS || "1") || 1;

const transpiler = new Bun.Transpiler({
  loader: "ts",
});

console.time("Get exports");
const file = readFileSync("remix-route.ts", "utf8");
for (let i = 0; i < ITERATIONS; i++) {
  const { imports, exports } = transpiler.scan(file);

  for (let j = 0; j < fixture.length; j++) {
    if (fixture[j] !== exports[j]) {
      throw new Error("Mismatch");
    }
  }
}

console.timeEnd("Get exports");

View on GitHub (pinned to 8c5296ac45)

Solutions

  1. Delete bun.lockb/bun.lock and run `bun install` to regenerate
  2. Or restore a known-good lockfile from git
  3. Upgrade Bun if a crashed save is the suspected producer
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: A partially saved or corrupted lockfile where packages exist without matching resolution entries; lockfile rewritten by something other than Bun.

Common situations: Interrupted installs, binary merge damage, or a bug in an older Bun's save path.

Related errors


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