{"record":{"id":"7a1da8329c91b20f","repo":"windmill-labs/windmill","slug":"no-script-file-found-next-to-filepath-a-scrip","errorCode":null,"errorMessage":"No script file found next to ${filePath} — a script cannot be deployed from its metadata alone. Add the matching script file (e.g. ${toCandidate('.ts')} or ${toCandidate('.py')}) or remove ${filePath}.","messagePattern":"No script file found next to (.+?) — a script cannot be deployed from its metadata alone\\. Add the matching script file \\(e\\.g\\. (.+?) or (.+?)\\) or remove (.+?)\\.","errorType":"exception","errorClass":"UnresolvableScriptContentFileError","httpStatus":null,"severity":"error","filePath":"cli/src/commands/script/script.ts","lineNumber":1201,"sourceCode":"    dbtCandidate.slice(0, -(\"__dbt/\" + DBT_DESCRIPTOR_NAME).length),\n  );\n  const nonDbtCandidates = validCandidates.filter((c) => c !== dbtCandidate);\n  if (dbtProject && nonDbtCandidates.length > 0) {\n    throw dbtPathCollisionError(dbtProject, nonDbtCandidates.join(\", \"));\n  }\n  if (validCandidates.length > 1) {\n    throw new UnresolvableScriptContentFileError(\n      `Multiple script files found next to ${filePath}: ${validCandidates.join(\", \")} — ` +\n        `cannot tell which one the metadata belongs to. Keep exactly one.`\n    );\n  }\n  if (validCandidates.length < 1) {\n    // Resolving to the absent descriptor keeps one content path for every\n    // caller; reading it yields an empty descriptor.\n    if (dbtProject) {\n      return dbtCandidate;\n    }\n    throw new UnresolvableScriptContentFileError(\n      `No script file found next to ${filePath} — a script cannot be deployed from its metadata alone. ` +\n        `Add the matching script file (e.g. ${toCandidate(\".ts\")} or ${toCandidate(\n          \".py\"\n        )}) or remove ${filePath}.`\n    );\n  }\n  return validCandidates[0];\n}\n\nexport function filePathExtensionFromContentType(\n  language: ScriptLanguage,\n  defaultTs: \"bun\" | \"deno\" | undefined\n): string {\n  if (language === \"python3\") {\n    return \".py\";\n  } else if (language === \"nativets\") {\n    return \".fetch.ts\";\n  } else if (language === \"bun\") {","sourceCodeStart":1183,"sourceCodeEnd":1219,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/script/script.ts#L1183-L1219","documentation":"Error \"No script file found next to ${filePath} — a script cannot be deployed from its metadata alone. Add the matching script file (e.g. ${toCandidate('.ts')} or ${toCandidate('.py')}) or remove ${filePath}.\" thrown in windmill-labs/windmill.","triggerScenarios":"Thrown at cli/src/commands/script/script.ts:1201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the matching script file next to the metadata, e.g. <name>.script.ts or <name>.script.py.","Remove the orphan metadata file if the script no longer exists locally."],"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"}