windmill-labs/windmill · error
runScript is deprecated. Use runScriptByPath or runScriptByH
Error message
runScript is deprecated. Use runScriptByPath or runScriptByHash instead.
What it means
console.warn from the deprecated runScript in the TS client: the method still runs the script (synchronously waiting for the result) but is deprecated in favor of runScriptByPath or runScriptByHash, which identify the target unambiguously.
Source
Thrown at typescript-client/client.ts:169
const workspace = getWorkspace();
jobId = jobId ?? getEnv("WM_JOB_ID");
if (jobId === undefined) {
throw Error("Job ID not set");
}
return await JobService.getRootJobId({ workspace, id: jobId });
}
/**
* @deprecated Use runScriptByPath or runScriptByHash instead
*/
export async function runScript(
path: string | null = null,
hash_: string | null = null,
args: Record<string, any> | null = null,
verbose: boolean = false,
tag: string | null = null
): Promise<any> {
console.warn(
"runScript is deprecated. Use runScriptByPath or runScriptByHash instead."
);
if (path && hash_) {
throw new Error("path and hash_ are mutually exclusive");
}
return _runScriptInternal(path, hash_, args, verbose, tag);
}
async function _runScriptInternal(
path: string | null = null,
hash_: string | null = null,
args: Record<string, any> | null = null,
verbose: boolean = false,
tag: string | null = null
): Promise<any> {
args = args || {};
if (verbose) {View on GitHub (pinned to e474e8803c)
Solutions
- Replace calls with runScriptByPath(path, ...) or runScriptByHash(hash, ...)
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at typescript-client/client.ts:169 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/bc16a21046b7fe2b.
Report an issue: GitHub.