heygen-com/hyperframes · error · Error

--launch-args-json requires a path

Error message

--launch-args-json requires a path

What it means

When --launch-args-json 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 args) or starts with --, it throws. The value should be a path to a JSON file containing a string array of Chrome launch arguments.

Source

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

    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;
      continue;
    }
    if (arg.startsWith("--launch-args-json=")) {
      const value = arg.slice("--launch-args-json=".length);
      if (!value) throw new Error("--launch-args-json requires a path");
      launchArgs = readLaunchArgs(value);
      continue;
    }
    throw new Error(`Unknown argument: ${arg}`);
  }
  return {
    ...(executablePath ? { executablePath } : {}),
    ...(launchArgs ? { launchArgs } : {}),
  };
}

View on GitHub (pinned to c2996c8626)

Solutions

  1. Provide the JSON file path after --launch-args-json: --launch-args-json ./launch-args.json.
  2. Use the equals form: --launch-args-json=./launch-args.json.

Example fix

// before
probe-beginframe.ts --launch-args-json

// after
probe-beginframe.ts --launch-args-json ./launch-args.json
Defensive patterns

Strategy: validation

Validate before calling

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

Prevention

When it happens

Trigger: Passing --launch-args-json as the last argument with no value, or followed immediately by another flag token like --executable-path.

Common situations: Forgetting to provide the JSON file path; the file path was accidentally consumed by a preceding flag; copy-paste from an incomplete command.

Related errors


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