{"record":{"id":"1a585b04115234cc","repo":"thedotmack/claude-mem","slug":"claude-mem-bun-version-probe-failed","errorCode":null,"errorMessage":"claude-mem: bun --version probe failed:","messagePattern":"claude-mem: bun --version probe failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/npx-cli/install/setup-runtime.ts","lineNumber":118,"sourceCode":"\nexport function getBunPath(): string | null {\n  return getToolPath('bun', BUN_COMMON_PATHS);\n}\n\nfunction isBunInstalled(): boolean {\n  return getBunPath() !== null;\n}\n\nexport function getBunVersion(): string | null {\n  const bunPath = getBunPath();\n  if (!bunPath) return null;\n\n  try {\n    const result = spawnVersionProbe(bunPath, ['--version']);\n    return result.status === 0 ? result.stdout.trim() : null;\n  } catch (error) {\n    const err = error instanceof Error ? error : new Error(String(error));\n    console.warn('claude-mem: bun --version probe failed:', err);\n    return null;\n  }\n}\n\nfunction getUvPath(): string | null {\n  return getToolPath('uv', UV_COMMON_PATHS);\n}\n\nfunction isUvInstalled(): boolean {\n  return getUvPath() !== null;\n}\n\nexport function getUvVersion(): string | null {\n  const uvPath = getUvPath();\n  if (!uvPath) return null;\n\n  try {\n    const result = spawnVersionProbe(uvPath, ['--version']);","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/e2d1df569a8f04075d40e92461128ece7cf04c82/src/npx-cli/install/setup-runtime.ts#L100-L136","documentation":"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).","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Confirm bun works in the same context the installer runs: `bun --version` from a plain shell and from CI","Reinstall bun if the shim is broken (curl -fsSL https://bun.sh/install | bash, or brew install bun)","Check the resolved path is executable: ls -l $(which bun) and run $(which bun) --version","If bun is intentionally absent, follow the installer's uv/Node fallback; the warning is informational"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { spawnSync } from 'node:child_process';\nconst probe = spawnSync('bun', ['--version'], { encoding: 'utf8' });\nif (probe.error) {\n  // ENOENT/EACCES here predicts the installer's 'bun --version probe failed' warning\n  // fix PATH or install bun before running `npx claude-mem install`\n}","typeGuard":"function isErrnoException(error: unknown): error is NodeJS.ErrnoException {\n  return error instanceof Error && typeof (error as NodeJS.ErrnoException).code === 'string'\n    && ['ENOENT', 'EACCES', 'EPERM'].includes((error as NodeJS.ErrnoException).code);\n}","tryCatchPattern":null,"preventionTips":["Install bun for the same user and environment that runs claude-mem install","Avoid version-manager shims that require an interactive shell in service/CI contexts","Keep PATH stable between the path probe and the version spawn during long installs"],"tags":["install","bun","spawn","dependency-probe"],"backgroundTag":"spawn-enoent","analyzedSha":"e2d1df569a8f04075d40e92461128ece7cf04c82","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}