thedotmack/claude-mem · error

Failed to install Bun. Please install manually: ${manualInst

Error message

Failed to install Bun. Please install manually:
${manualInstructions}
Then restart your terminal and try again.
Underlying error: ${describeExecError(err)}

What it means

Thrown by installBun() when runBunInstaller() throws — i.e. the installer script itself failed (network, timeout, non-zero exit) OR the post-install binary check failed (error 34). It wraps the underlying error with platform-specific manual install instructions and a describeExecError() dump of stdout/stderr. This is the user-facing failure for bun auto-install.

Source

Thrown at src/npx-cli/install/setup-runtime.ts:190

    });
  }

  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)}`,
    );
  }
}

/** Run the platform-specific uv installer, then confirm the binary is resolvable. */
function runUvInstaller(): void {
  if (IS_WINDOWS) {
    execSync('powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"', {
      stdio: 'pipe',
      timeout: INSTALL_TIMEOUT_MS,
      shell: process.env.ComSpec ?? 'cmd.exe',
    });
  } else {
    execSync('curl -LsSf https://astral.sh/uv/install.sh | sh', {
      stdio: 'pipe',
      timeout: INSTALL_TIMEOUT_MS,

View on GitHub (pinned to d768ba3643)

Solutions

  1. Follow the manual instructions in the error: install bun via winget/brew/curl into a PATH directory, then re-run claude-mem install.
  2. If network is the cause, configure HTTP(S)_PROXY for the install or pre-install bun on a connected machine and copy it in.
  3. If the error's 'Underlying error' section shows a timeout, retry on a faster connection or raise INSTALL_TIMEOUT_MS.
  4. Confirm `bun --version` works in the same shell before retrying, so the post-install check passes.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  installBun();
} catch (e) {
  if (e instanceof Error && /Failed to install Bun/.test(e.message)) {
    // parse manualInstructions, prompt user to install bun by hand, then retry
  }
  throw e;
}

Prevention

When it happens

Trigger: curl cannot reach bun.sh (offline, proxy, firewall). The installer script exits non-zero. INSTALL_TIMEOUT_MS exceeded (execSync timeout). bash shell not available for the pipe. The post-install isBunInstalled() check fails and error 34 propagates into this catch. Corporate proxy mangling the install script.

Common situations: Air-gapped or proxy-filtered networks. Slow connections hitting the install timeout. Locked-down Windows machines where powershell remoting is restricted. Sandboxed CI without outbound network.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12). Data as JSON: /api/errors/be2099a5f7f41912. Report an issue: GitHub.