windmill-labs/windmill · error

runScriptAsync is deprecated. Use runScriptByPathAsync or ru

Error message

runScriptAsync is deprecated. Use runScriptByPathAsync or runScriptByHashAsync instead.

What it means

console.warn from the deprecated runScriptAsync in the TS client: the method still queues the run and returns the job id, but runScriptByPathAsync / runScriptByHashAsync are the supported ways to launch a run asynchronously by explicit identifier.

Source

Thrown at typescript-client/client.ts:413

    if (p.startsWith("{") || p.startsWith("[")) return "";
    // Strip type annotation (e.g. "x: number" -> "x", "x?: string" -> "x")
    const colonIdx = p.indexOf(":");
    if (colonIdx !== -1) p = p.slice(0, colonIdx);
    return p.replace(/\?$/, "").trim();
  }).filter(Boolean);
}

/**
 * @deprecated Use runScriptByPathAsync or runScriptByHashAsync instead
 */
export async function runScriptAsync(
  path: string | null,
  hash_: string | null,
  args: Record<string, any> | null,
  scheduledInSeconds: number | null = null,
  tag: string | null = null
): Promise<string> {
  console.warn(
    "runScriptAsync is deprecated. Use runScriptByPathAsync or runScriptByHashAsync instead."
  );
  // Create a script job and return its job id.
  if (path && hash_) {
    throw new Error("path and hash_ are mutually exclusive");
  }
  return _runScriptAsyncInternal(path, hash_, args, scheduledInSeconds, tag);
}

async function _runScriptAsyncInternal(
  path: string | null = null,
  hash_: string | null = null,
  args: Record<string, any> | null = null,
  scheduledInSeconds: number | null = null,
  tag: string | null = null
): Promise<string> {
  // Create a script job and return its job id.
  args = args || {};

View on GitHub (pinned to e474e8803c)

Solutions

  1. Replace calls with runScriptByPathAsync or runScriptByHashAsync
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at typescript-client/client.ts:413 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/434ed40af18a6465. Report an issue: GitHub.