oven-sh/bun · error · Error

not called

Error message

not called

What it means

A git dependency's repository could not be found. It is detected by scanning git's stderr after ls-remote/clone for 'remote: ... not ... found' or 'does not exist' (src/install/repository.rs:384-393); the task layer treats it as a distinct outcome (src/install/PackageManagerTask.rs:426).

Source

Thrown at bench/emitter/microbench.mjs:39

groupForEmitter("on x 10_000 (handler)", ({ EventEmitter, name }) => {
  const emitter = new EventEmitter();

  bench(name, () => {
    var cb = event => {
      event.preventDefault();
    };
    emitter.on("hey", cb);
    var called = false;
    for (let i = 0; i < 10_000; i++)
      emitter.emit("hey", {
        preventDefault() {
          id++;
          called = true;
        },
      });

    if (!called) throw new Error("not called");
  });
});

// for (let { impl: EventEmitter, name, monkey } of []) {
//   if (monkey) {
//     var monkeyEmitter = Object.assign({}, EventEmitter.prototype);
//     monkeyEmitter.on("hello", event => {
//       event.preventDefault();
//     });

//     bench(`[monkey] ${className}.emit`, () => {
//       var called = false;
//       monkeyEmitter.emit("hello", {
//         preventDefault() {
//           id++;
//           called = true;
//         },
//       });

View on GitHub (pinned to 8c5296ac45)

Solutions

  1. Verify the URL independently: `git ls-remote <url>` (or open it in a browser)
  2. For private repos, switch to SSH (git@github.com:owner/repo.git) or authenticate via gh/git credential helper
  3. Fix typos in the owner/repo path and pin a full commit SHA or existing tag
  4. If the repo was renamed, update the dependency spec and lockfile to the new location

Example fix

// before
"dep": "github:acme/old-name"

// after (renamed repo, pinned commit, ssh access)
"dep": "github:acme/new-name#9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4"
Defensive patterns

Strategy: validation

Validate before calling

// Precheck a git dependency before running bun install:
function repoExists(url) {
  const r = Bun.spawnSync(["git", "ls-remote", url], { stdout: "pipe", stderr: "pipe" });
  return r.exitCode === 0;
}

Type guard

const isWellFormedGitDep = (spec) =>
  /^(github:|git\+https?:\/\/|git\+ssh:|https:\/\/[^/]+\/[^/]+\/[^/]+\.git)(#.*)?$/.test(spec);

Prevention

When it happens

Trigger: `bun add github:owner/repo` (or a git+https/git+ssh URL in package.json) where the repo does not exist, was renamed/deleted, is private without credentials, or the SSH key lacks access (git also reports 'Repository not found' for auth failures).

Common situations: Typos in owner/repo or the ref; private repos over HTTPS with no token in CI; a repo renamed after the lockfile was written; expired credentials or a missing deploy key.

Related errors


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