{"record":{"id":"bf72500ce14fcbc9","repo":"Hmbown/CodeWhale","slug":"unknown-binary-name","errorCode":null,"errorMessage":"Unknown binary: ${name}","messagePattern":"Unknown binary: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/install.js","lineNumber":1620,"sourceCode":"      env,\n    }),\n  ]); // single binary\n}\n\nasync function getBinaryPath(name) {\n  await run({ context: \"runtime\" });\n  const paths = binaryPaths();\n  if (name === \"codewhale\") {\n    return paths.codewhale.target;\n  }\n  if (name === \"codew\") {\n    return paths.codew.target;\n  }\n  if (name === \"codewhale-tui\") {\n    // v0.9.5 single-binary: codewhale-tui is now an alias to codewhale for backwards compat\n    return paths.codewhale.target;\n  }\n  throw new Error(`Unknown binary: ${name}`);\n}\n\nmodule.exports = {\n  getBinaryPath,\n  installFailureHint,\n  run,\n  _internal: {\n    resolvePackageVersion,\n    resolveRepo,\n    isOptionalInstall,\n    shouldForceDownload,\n    shouldDisableInstall,\n    isQuietInstall,\n    adoptExistingBinaryIfValid,\n    shouldIgnoreInstallFailure,\n    shouldSkipOptionalPostinstall,\n    httpRequest,\n    defaultTimeoutMs,","sourceCodeStart":1602,"sourceCodeEnd":1638,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/npm/codewhale/scripts/install.js#L1602-L1638","documentation":"The npm installer's getBinaryPath() maps a package/binary name to a prebuilt binary target path. Only a known set of names (including codewhale-tui, which aliases to codewhale since v0.9.5) is supported; anything else is rejected with this error.","triggerScenarios":"Calling getBinaryPath (directly or via install/run) with a name not in the supported map, e.g. a renamed or removed binary name like an old codewhale-* package name, or a typo.","commonSituations":"Running an old npm package version whose binary name no longer exists after the v0.9.5 single-binary consolidation; third-party scripts hardcoding legacy binary names; typos in CODEWHALE binary selection env/config.","solutions":["Check the binary name spelling and use 'codewhale' (or 'codewhale-tui')","Upgrade the npm package to the latest version so legacy names resolve to the single binary","If invoking programmatically, pass the exported name from module metadata instead of a hardcoded string"],"exampleFix":"// before\nconst p = getBinaryPath(\"codewhale-cli\");\n// after\nconst p = getBinaryPath(\"codewhale\");","handlingStrategy":"validation","validationCode":"const { getBinaryPath } = require(\"./scripts/install.js\");\nconst SUPPORTED = [\"codewhale\", \"codewhale-tui\"];\nif (!SUPPORTED.includes(name)) throw new Error(`Unsupported binary name: ${name}; use one of ${SUPPORTED.join(\", \")}`);\nconst p = getBinaryPath(name);","typeGuard":null,"tryCatchPattern":"try { p = getBinaryPath(name); } catch (e) { if (!/Unknown binary/.test(e.message)) throw e; p = getBinaryPath(\"codewhale\"); }","preventionTips":["Never hardcode legacy binary names; import the canonical name","After upgrading, grep scripts for codewhale-* binary names","Handle the v0.9.5 single-binary consolidation explicitly"],"tags":["npm","installer","unknown-binary"],"backgroundTag":"invalid-argument-value","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}