heygen-com/hyperframes · error · Error

--executable-path requires a path

Error message

--executable-path requires a path

What it means

When --executable-path is passed as a separate token (space-separated paired form), the parser looks at the next argument as the value. If the next arg is missing (end of the args array) or starts with -- (looks like another flag), it throws. The value must be a filesystem path to a Chromium executable.

Source

Thrown at packages/aws-lambda/scripts/probe-beginframe.ts:65

export interface ProbeOptions {
  executablePath?: string;
  /** Exact launch arguments to probe instead of the standalone default profile. */
  launchArgs?: string[];
  /** Test override for the renderer/CDP operation deadline. */
  timeoutMs?: number;
}

// The CLI accepts paired and equals forms for two independent path options.
// fallow-ignore-next-line complexity
export function parseProbeArgs(args: string[]): ProbeOptions {
  let executablePath: string | undefined;
  let launchArgs: string[] | undefined;
  for (let i = 0; i < args.length; i += 1) {
    const arg = args[i];
    if (arg === "--executable-path") {
      const value = args[i + 1];
      if (!value || value.startsWith("--")) {
        throw new Error("--executable-path requires a path");
      }
      executablePath = resolve(value);
      i += 1;
      continue;
    }
    if (arg.startsWith("--executable-path=")) {
      const value = arg.slice("--executable-path=".length);
      if (!value) throw new Error("--executable-path requires a path");
      executablePath = resolve(value);
      continue;
    }
    if (arg === "--launch-args-json") {
      const value = args[i + 1];
      if (!value || value.startsWith("--")) {
        throw new Error("--launch-args-json requires a path");
      }
      launchArgs = readLaunchArgs(value);
      i += 1;

View on GitHub (pinned to c2996c8626)

Solutions

  1. Provide the path after --executable-path: --executable-path /path/to/chrome.
  2. Use the equals form instead: --executable-path=/path/to/chrome.
  3. Ensure no shell variable expands to empty before the path token.

Example fix

// before
--executable-path --launch-args-json=args.json

// after
--executable-path /usr/bin/chrome-headless-shell --launch-args-json=args.json
Defensive patterns

Strategy: validation

Validate before calling

const i = args.indexOf("--executable-path");
if (i !== -1) {
  const value = args[i + 1];
  if (!value || value.startsWith("--")) {
    console.error("--executable-path requires a path argument. Usage: --executable-path /path/to/chrome");
    process.exit(1);
  }
}

Prevention

When it happens

Trigger: Passing --executable-path as the last argument with no value following it, or followed immediately by another flag like --executable-path --launch-args-json=args.json where the parser sees --launch-args-json as the value and rejects it.

Common situations: Forgetting to provide the path; shell variable that expanded to empty and was consumed; copy-paste error leaving the path off the command.

Related errors


AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12). Data as JSON: /api/errors/ed3164e73fa1dc43. Report an issue: GitHub.