{"record":{"id":"e73e3e222230c46f","repo":"rohitg00/agentmemory","slug":"missing-not-found-cannot-auto-install-iii-engi","errorCode":null,"errorMessage":"${missing} not found. Cannot auto-install iii-engine.","messagePattern":"(.+?) not found\\. Cannot auto-install iii-engine\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli.ts","lineNumber":1398,"sourceCode":"\n  if (IS_WINDOWS || isZipAsset) {\n    p.log.info(\n      `Auto-install unavailable on ${platform()} — ${asset} isn't tar-compatible. Install manually:\\n` +\n        `  1. Download ${releaseUrl}\\n` +\n        `  2. Extract iii.exe and place it on PATH (e.g. %USERPROFILE%\\\\.local\\\\bin)\\n` +\n        `Or use Docker: docker pull iiidev/iii:${IIPINNED_VERSION}`,\n    );\n    return { ok: false, binPath: null };\n  }\n\n  const shBin = whichBinary(\"sh\");\n  const curlBin = whichBinary(\"curl\");\n  const tarBin = whichBinary(\"tar\");\n  if (!shBin || !curlBin || !tarBin) {\n    const missing = [!shBin && \"sh\", !curlBin && \"curl\", !tarBin && \"tar\"]\n      .filter(Boolean)\n      .join(\", \");\n    p.log.warn(`${missing} not found. Cannot auto-install iii-engine.`);\n    return { ok: false, binPath: null };\n  }\n\n  const binDir = agentmemoryBinDir();\n  const binPath = privateIiiPath();\n  const installCmd = [\n    `mkdir -p \"${binDir}\"`,\n    `curl -fsSL \"${releaseUrl}\" | tar -xz -C \"${binDir}\"`,\n    `chmod +x \"${binPath}\"`,\n  ].join(\" && \");\n  const installerOk = runCommand(shBin, [\"-c\", installCmd], {\n    label: `Installing iii-engine v${IIPINNED_VERSION} (pinned)`,\n    optional: true,\n  });\n  if (!installerOk) {\n    p.log.warn(\n      `iii-engine installer failed. Fallbacks: Docker (\\`docker pull iiidev/iii:${IIPINNED_VERSION}\\`) or download manually from https://github.com/iii-hq/iii/releases/tag/iii%2Fv${IIPINNED_VERSION}.`,\n    );","sourceCodeStart":1380,"sourceCodeEnd":1416,"githubUrl":"https://github.com/rohitg00/agentmemory/blob/e04ba88819c365c9acf9d6661ea802143e728bd6/src/cli.ts#L1380-L1416","documentation":"Before auto-installing iii-engine on non-Windows systems, runIiiInstaller requires three system tools: sh, curl, and tar (used to download and extract the release archive). If any is absent, it lists exactly which ones are missing and warns that iii-engine cannot be auto-installed, returning failure without downloading anything.","triggerScenarios":"Auto-install path runs and whichBinary returns null for sh, curl, or tar — e.g. distroless/minimal containers lacking tar or curl, or Windows-like environments without sh reaching this path.","commonSituations":"Scratch/Docker images built without coreutils/tar; CI runners with stripped images; tampered PATH excluding /usr/bin; security-hardened containers dropping shell utilities.","solutions":["Install the missing tools: e.g. `apt-get install -y curl tar` (or apk equivalent); sh is almost always present on Unix.","Run the CLI from a fuller base image or standard shell environment.","Install iii-engine manually (Docker `docker pull iiidev/iii:<pinned>` or download the release binary) so auto-install is skipped.","Fix the PATH so the tools already installed are discoverable (`which tar` should succeed)."],"exampleFix":"// before: tar missing in slim image\n$ docker run node:alpine agentmemory start  # tar not found\n// after\n$ RUN apk add --no-cache curl tar  # then re-run agentmemory start","handlingStrategy":"validation","validationCode":"import { execFileSync } from \"node:child_process\";\nconst missing = [\"sh\", \"curl\", \"tar\"].filter((b) => {\n  try { execFileSync(\"which\", [b], { stdio: \"ignore\" }); return false; } catch { return true; }\n});\nif (missing.length) console.error(`Pre-install: apt-get install -y ${missing.join(\" \")}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use standard base images (not scratch/distroless) for anything running the CLI.","Add curl and tar to your Dockerfile if the image lacks them.","Do not strip /usr/bin utilities in hardened images used for dev tooling.","Confirm PATH includes standard binary dirs."],"tags":["environment","path","installation","iii-engine"],"backgroundTag":"required-tooling-missing","analyzedSha":"e04ba88819c365c9acf9d6661ea802143e728bd6","analyzedAt":"2026-08-30T01:07:40.754Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}