{"record":{"id":"9eaf96e54888df0e","repo":"ComposioHQ/composio","slug":"unknown-target-s-unknown-join-expected","errorCode":null,"errorMessage":"Unknown target(s): ${unknown.join(', ')}. Expected one of: all, ${targets.map(target => target.platform).join(', ')}","messagePattern":"Unknown target\\(s\\): (.+?)\\. Expected one of: all, (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts","lineNumber":201,"sourceCode":"The binaries are stripped release builds for macOS arm64. They require local macOS Messages data and may prompt for Messages Data, Accessibility, Contacts, and Automation permissions depending on the command.\n`;\n  await fs.writeFile(path.join(outputRoot, 'NOTICE.md'), notice, 'utf8');\n};\n\nconst parseTargets = (): ReadonlyArray<Target> => {\n  const rawArgs = process.argv.slice(2).filter(arg => arg !== '--');\n  const targetIndex = rawArgs.indexOf('--target');\n  const args =\n    targetIndex >= 0 && rawArgs[targetIndex + 1]\n      ? [rawArgs[targetIndex + 1]!]\n      : rawArgs.filter(arg => !arg.startsWith('--'));\n\n  if (args.length === 0 || args.includes('all')) return targets;\n\n  const selected = targets.filter(target => args.includes(target.platform));\n  const unknown = args.filter(arg => !targets.some(target => target.platform === arg));\n  if (unknown.length > 0) {\n    throw new Error(\n      `Unknown target(s): ${unknown.join(', ')}. Expected one of: all, ${targets\n        .map(target => target.platform)\n        .join(', ')}`\n    );\n  }\n  return selected;\n};\n\nconst main = async () => {\n  ensurePlatform();\n  await ensureSubmodule();\n\n  await fs.mkdir(outputRoot, { recursive: true });\n  const selectedTargets = parseTargets();\n  for (const target of selectedTargets) {\n    await buildTarget(target);\n  }\n","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts#L183-L219","documentation":"The script accepts explicit target platform names (or 'all'); any argument that doesn't match a known target is rejected up front with the list of valid names rather than silently building nothing.","triggerScenarios":"Invoking the script with a misspelled or outdated platform name, e.g. `build-beeper-imessage-binaries macos-arm` when valid targets use different identifiers (e.g. macos-arm64), or passing 'aarch64'.","commonSituations":"Target list changed between versions; shell completion/aliases from an older release; typos in CI matrix definitions.","solutions":["Re-run with a valid target from the printed list or 'all' (e.g. `pnpm run build:imessage all`).","Check the current `targets` array at the top of the script for the exact accepted platform identifiers and update your CI/scripts."],"exampleFix":"# before\npnpm tsx scripts/build-beeper-imessage-binaries.ts macos-arm\n\n# after\npnpm tsx scripts/build-beeper-imessage-binaries.ts macos-arm64","handlingStrategy":"validation","validationCode":"const valid = new Set([...targets.map(t => t.platform), 'all']);\nconst unknown = args.filter(a => !valid.has(a));\nif (unknown.length) { console.error(`Unknown targets: ${unknown.join(', ')}`); process.exit(1); }","typeGuard":"const isKnownTarget = (arg: string, platforms: readonly string[]): boolean =>\n  arg === 'all' || platforms.includes(arg);","tryCatchPattern":null,"preventionTips":["Read the script's targets array (or --help output) before wiring target names into CI matrices.","Treat any 'unknown target' error as a name-drift signal: diff the current target list against your scripts."],"tags":["cli-arguments","build-script","target-selection"],"backgroundTag":"unknown-cli-target","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}