{"record":{"id":"bc16a21046b7fe2b","repo":"windmill-labs/windmill","slug":"runscript-is-deprecated-use-runscriptbypath-or-ru","errorCode":null,"errorMessage":"runScript is deprecated. Use runScriptByPath or runScriptByHash instead.","messagePattern":"runScript is deprecated\\. Use runScriptByPath or runScriptByHash instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"typescript-client/client.ts","lineNumber":169,"sourceCode":"  const workspace = getWorkspace();\n  jobId = jobId ?? getEnv(\"WM_JOB_ID\");\n  if (jobId === undefined) {\n    throw Error(\"Job ID not set\");\n  }\n  return await JobService.getRootJobId({ workspace, id: jobId });\n}\n\n/**\n * @deprecated Use runScriptByPath or runScriptByHash instead\n */\nexport async function runScript(\n  path: string | null = null,\n  hash_: string | null = null,\n  args: Record<string, any> | null = null,\n  verbose: boolean = false,\n  tag: string | null = null\n): Promise<any> {\n  console.warn(\n    \"runScript is deprecated. Use runScriptByPath or runScriptByHash instead.\"\n  );\n  if (path && hash_) {\n    throw new Error(\"path and hash_ are mutually exclusive\");\n  }\n  return _runScriptInternal(path, hash_, args, verbose, tag);\n}\n\nasync function _runScriptInternal(\n  path: string | null = null,\n  hash_: string | null = null,\n  args: Record<string, any> | null = null,\n  verbose: boolean = false,\n  tag: string | null = null\n): Promise<any> {\n  args = args || {};\n\n  if (verbose) {","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/typescript-client/client.ts#L151-L187","documentation":"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.","triggerScenarios":"Thrown at typescript-client/client.ts:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace calls with runScriptByPath(path, ...) or runScriptByHash(hash, ...)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}