thedotmack/claude-mem · warning

claude-mem: bun --version probe failed:

Error message

claude-mem: bun --version probe failed:

What it means

getBunVersion() spawns `bun --version` through spawnVersionProbe. If the spawn itself throws (ENOENT because bun disappeared between the path lookup and the spawn, EACCES on a non-executable shim, or a broken version-manager shim), the warning prints and the function returns null, so the installer treats bun as absent and takes its missing-bun path (prompting you to install bun or use the documented fallback).

Source

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

export function getBunPath(): string | null {
  return getToolPath('bun', BUN_COMMON_PATHS);
}

function isBunInstalled(): boolean {
  return getBunPath() !== null;
}

export function getBunVersion(): string | null {
  const bunPath = getBunPath();
  if (!bunPath) return null;

  try {
    const result = spawnVersionProbe(bunPath, ['--version']);
    return result.status === 0 ? result.stdout.trim() : null;
  } catch (error) {
    const err = error instanceof Error ? error : new Error(String(error));
    console.warn('claude-mem: bun --version probe failed:', err);
    return null;
  }
}

function getUvPath(): string | null {
  return getToolPath('uv', UV_COMMON_PATHS);
}

function isUvInstalled(): boolean {
  return getUvPath() !== null;
}

export function getUvVersion(): string | null {
  const uvPath = getUvPath();
  if (!uvPath) return null;

  try {
    const result = spawnVersionProbe(uvPath, ['--version']);

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Confirm bun works in the same context the installer runs: `bun --version` from a plain shell and from CI
  2. Reinstall bun if the shim is broken (curl -fsSL https://bun.sh/install | bash, or brew install bun)
  3. Check the resolved path is executable: ls -l $(which bun) and run $(which bun) --version
  4. If bun is intentionally absent, follow the installer's uv/Node fallback; the warning is informational
Defensive patterns

Strategy: validation

Validate before calling

import { spawnSync } from 'node:child_process';
const probe = spawnSync('bun', ['--version'], { encoding: 'utf8' });
if (probe.error) {
  // ENOENT/EACCES here predicts the installer's 'bun --version probe failed' warning
  // fix PATH or install bun before running `npx claude-mem install`
}

Type guard

function isErrnoException(error: unknown): error is NodeJS.ErrnoException {
  return error instanceof Error && typeof (error as NodeJS.ErrnoException).code === 'string'
    && ['ENOENT', 'EACCES', 'EPERM'].includes((error as NodeJS.ErrnoException).code);
}

Prevention

When it happens

Trigger: `npx claude-mem install` when bun was found on PATH earlier by getBunPath() but the binary is gone at spawn time, a mise/asdf/volta shim for bun is broken, or the install runs in an environment (CI, service context) whose PATH differs from your interactive shell.

Common situations: bun uninstalled or renamed mid-probe; shims that fail outside an interactive shell; bun installed for a different user; PATH ordering changing between the path probe and the version spawn.

Related errors


AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20). Data as JSON: /api/errors/1a585b04115234cc. Report an issue: GitHub.