{"record":{"id":"b311ce70a08a28d4","repo":"windmill-labs/windmill","slug":"failed-to-parse-relative-imports-for-scriptpath","errorCode":null,"errorMessage":"Failed to parse relative imports for ${scriptPath}: ${e}. Dependency tracking for relative imports will be disabled.","messagePattern":"Failed to parse relative imports for (.+?): (.+?)\\. Dependency tracking for relative imports will be disabled\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/utils/relative_imports.ts","lineNumber":36,"sourceCode":"  language: ScriptLanguage\n): Promise<string[]> {\n  try {\n    switch (language) {\n      case \"bun\":\n      case \"nativets\":\n      case \"deno\": {\n        const { parse_ts_relative_imports } = await loadParser(\"windmill-parser-wasm-ts\");\n        return parse_ts_relative_imports(code, scriptPath);\n      }\n      case \"python3\": {\n        const { parse_py_relative_imports } = await loadParser(\"windmill-parser-wasm-py-imports\");\n        return parse_py_relative_imports(code, scriptPath);\n      }\n      default:\n        return [];\n    }\n  } catch (e) {\n    log.warn(`Failed to parse relative imports for ${scriptPath}: ${e}. Dependency tracking for relative imports will be disabled.`);\n    return [];\n  }\n}\n","sourceCodeStart":18,"sourceCodeEnd":40,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/utils/relative_imports.ts#L18-L40","documentation":"Guard catch in extractRelativeImports: the language parser (wasm TS/Python import parser) threw while scanning the script's code for relative imports. Dependency tracking for relative imports of this script is disabled — its imports won't be tracked in sync/staleness, but the push continues.","triggerScenarios":"Thrown at cli/src/utils/relative_imports.ts:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the syntax error in the script that breaks the parser","Update the CLI so parser/wasm versions handle the construct","Manually track the dependency or import it by path so sync still sees it"],"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"}