ComposioHQ/composio · warning · Error

Unknown target(s): ${unknown.join(', ')}. Expected one of: a

Error message

Unknown target(s): ${unknown.join(', ')}. Expected one of: all, ${targets.map(target => target.platform).join(', ')}

What it means

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.

Source

Thrown at ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts:201

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.
`;
  await fs.writeFile(path.join(outputRoot, 'NOTICE.md'), notice, 'utf8');
};

const parseTargets = (): ReadonlyArray<Target> => {
  const rawArgs = process.argv.slice(2).filter(arg => arg !== '--');
  const targetIndex = rawArgs.indexOf('--target');
  const args =
    targetIndex >= 0 && rawArgs[targetIndex + 1]
      ? [rawArgs[targetIndex + 1]!]
      : rawArgs.filter(arg => !arg.startsWith('--'));

  if (args.length === 0 || args.includes('all')) return targets;

  const selected = targets.filter(target => args.includes(target.platform));
  const unknown = args.filter(arg => !targets.some(target => target.platform === arg));
  if (unknown.length > 0) {
    throw new Error(
      `Unknown target(s): ${unknown.join(', ')}. Expected one of: all, ${targets
        .map(target => target.platform)
        .join(', ')}`
    );
  }
  return selected;
};

const main = async () => {
  ensurePlatform();
  await ensureSubmodule();

  await fs.mkdir(outputRoot, { recursive: true });
  const selectedTargets = parseTargets();
  for (const target of selectedTargets) {
    await buildTarget(target);
  }

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Re-run with a valid target from the printed list or 'all' (e.g. `pnpm run build:imessage all`).
  2. Check the current `targets` array at the top of the script for the exact accepted platform identifiers and update your CI/scripts.

Example fix

# before
pnpm tsx scripts/build-beeper-imessage-binaries.ts macos-arm

# after
pnpm tsx scripts/build-beeper-imessage-binaries.ts macos-arm64
Defensive patterns

Strategy: validation

Validate before calling

const valid = new Set([...targets.map(t => t.platform), 'all']);
const unknown = args.filter(a => !valid.has(a));
if (unknown.length) { console.error(`Unknown targets: ${unknown.join(', ')}`); process.exit(1); }

Type guard

const isKnownTarget = (arg: string, platforms: readonly string[]): boolean =>
  arg === 'all' || platforms.includes(arg);

Prevention

When it happens

Trigger: 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'.

Common situations: Target list changed between versions; shell completion/aliases from an older release; typos in CI matrix definitions.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/9eaf96e54888df0e. Report an issue: GitHub.