thedotmack/claude-mem · warning

claude-mem: uv --version probe failed:

Error message

claude-mem: uv --version probe failed:

What it means

getUvVersion() spawns `uv --version` through spawnVersionProbe. If the spawn throws (ENOENT, EACCES, or a broken shim), the warning prints and the function returns null, so the installer treats uv as missing and prints its manual-install guidance (curl -LsSf https://astral.sh/uv/install.sh | sh or brew install uv) instead of proceeding with a known uv version.

Source

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

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']);
    return result.status === 0 ? result.stdout.trim() : null;
  } catch (error) {
    const err = error instanceof Error ? error : new Error(String(error));
    console.warn('claude-mem: uv --version probe failed:', err);
    return null;
  }
}

function describeExecError(error: unknown): string {
  if (error && typeof error === 'object') {
    const e = error as { message?: string; stdout?: Buffer | string; stderr?: Buffer | string };
    const parts: string[] = [];
    if (e.message) parts.push(e.message);
    const stderr = e.stderr ? e.stderr.toString().trim() : '';
    if (stderr) parts.push(`stderr: ${stderr}`);
    const stdout = e.stdout ? e.stdout.toString().trim() : '';
    if (!stderr && stdout) parts.push(`stdout: ${stdout}`);
    return parts.join('\n');
  }
  return String(error);
}

View on GitHub (pinned to e2d1df569a)

Solutions

  1. Confirm uv works where the installer runs: `uv --version`
  2. Reinstall uv with the command the installer prints: curl -LsSf https://astral.sh/uv/install.sh | sh (or brew install uv), then re-run install
  3. Verify the resolved binary is executable: ls -l $(which uv)
  4. Proceed without uv only if you accept the installer's fallback for the vector-search runtime
Defensive patterns

Strategy: validation

Validate before calling

import { spawnSync } from 'node:child_process';
const probe = spawnSync('uv', ['--version'], { encoding: 'utf8' });
if (probe.error) {
  // ENOENT/EACCES here predicts the installer's 'uv --version probe failed' warning
  // install uv (curl -LsSf https://astral.sh/uv/install.sh | sh) before re-running 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 uv was found by getUvPath() but cannot be spawned: the binary was removed, a version-manager shim is broken, or the install environment's PATH does not include the uv location.

Common situations: uv uninstalled between the path probe and the spawn; uv installed in a user-local bin not on the service PATH; Windows uv.exe permissions; CI images where uv exists only in a build stage.

Related errors


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