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
- Verify the URL independently: `git ls-remote <url>` (or open it in a browser)
- For private repos, switch to SSH (git@github.com:owner/repo.git) or authenticate via gh/git credential helper
- Fix typos in the owner/repo path and pin a full commit SHA or existing tag
- 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
- Run `git ls-remote <url>` once when adding a new git dependency
- Give CI a machine user/deploy key for private repos instead of hoping https works
- Pin full commit SHAs so renamed repos are still recoverable from the local git cache
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
- TarballHTTP401
- TarballHTTP403
- page-cache eviction failed for ${path}; results would be war
- Failed to install package "${module}"
- Invalid gzip data
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/dae1a730d1e18a8f.
Report an issue: GitHub.