thedotmack/claude-mem · error
Bun installation completed but binary not found. Please rest
Error message
Bun installation completed but binary not found. Please restart your terminal and try again.
What it means
Thrown by runBunInstaller() after the platform installer script (curl|bash or powershell irm|iex) returned exit 0 but isBunInstalled() still reports false. The installer succeeded as a process but the bun binary is not resolvable on the current PATH, so claude-mem cannot proceed — bun is mandatory for hooks. This is distinct from error 35, which covers the installer itself failing.
Source
Thrown at src/npx-cli/install/setup-runtime.ts:176
/** Run the platform-specific Bun installer, then confirm the binary is resolvable. */
function runBunInstaller(): void {
if (IS_WINDOWS) {
execSync('powershell -c "irm bun.sh/install.ps1 | iex"', {
stdio: 'pipe',
timeout: INSTALL_TIMEOUT_MS,
shell: process.env.ComSpec ?? 'cmd.exe',
});
} else {
execSync('curl -fsSL https://bun.sh/install | bash', {
stdio: 'pipe',
timeout: INSTALL_TIMEOUT_MS,
shell: '/bin/bash',
});
}
if (!isBunInstalled()) {
throw new Error(
'Bun installation completed but binary not found. Please restart your terminal and try again.',
);
}
}
function installBun(): void {
try {
runBunInstaller();
} catch (error) {
const err = error instanceof Error ? error : new Error(String(error));
const manualInstructions = IS_WINDOWS
? ' - winget install Oven-sh.Bun\n - Or: powershell -c "irm bun.sh/install.ps1 | iex"'
: ' - curl -fsSL https://bun.sh/install | bash\n - Or: brew install oven-sh/bun/bun';
throw new Error(
`Failed to install Bun. Please install manually:\n${manualInstructions}\nThen restart your terminal and try again.\n` +
`Underlying error: ${describeExecError(err)}`,
);
}View on GitHub (pinned to d768ba3643)
Solutions
- Open a new terminal so PATH is reloaded from the updated shell profile, then re-run the installer.
- Prepend bun's install dir (default ~/.bun/bin) to PATH for the current process and retry.
- Install bun manually (brew/winget/npm) into a directory already on PATH and re-run.
- Verify with `bun --version` in the same shell before retrying the claude-mem install.
Defensive patterns
Strategy: validation
Validate before calling
function bunOnPath(): boolean {
try { execSync('bun --version', { stdio: 'pipe' }); return true; } catch { return false; }
}
if (!bunOnPath()) { /* abort install with a PATH hint */ } Try / catch
try {
runBunInstaller();
} catch (e) {
if (e instanceof Error && /binary not found/.test(e.message)) {
// prompt user to open a new terminal, or prepend ~/.bun/bin to PATH
}
throw e;
} Prevention
- After any bun install, open a new shell so PATH includes ~/.bun/bin before retrying.
- In CI, source the updated shell profile or prepend the install dir to PATH within the same job.
- Verify `bun --version` works in the same shell that runs the claude-mem install.
When it happens
Trigger: The installer wrote bun to ~/.bun/bin but that directory is not on PATH in the current process. On Windows, bun installed to a user-local dir not in the current cmd PATH. A non-default BUN_INSTALL dir. The installer modified shell rc files that only take effect after a new shell. PATH not exported to the child process running install.
Common situations: First install on a machine where ~/.bun/bin was just added to .bashrc but the current shell predates it. CI where the install runs in a subshell whose PATH isn't refreshed. Windows installs where the per-user PATH update needs a new terminal.
Related errors
- Failed to install Bun. Please install manually: ${manualInst
- uv installation completed but binary not found. Please resta
- Failed to install uv. Please install manually: ${manualInstr
- Post-install check failed: unresolvable modules: ${unresolva
- bun install failed in ${targetDir} ${describeExecError(err)}
AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12).
Data as JSON: /api/errors/93f390309fc864b2.
Report an issue: GitHub.