windmill-labs/windmill · error
Invalid extension: + path
Error message
Invalid extension: + path
What it means
removeExtensionToPath could not strip any known script extension from the given path: the path does not end with any recognized script content-file suffix, so it is not a script content file this function can handle.
Source
Thrown at cli/src/commands/script/script.ts:1330
* Whether a path is a script's content file.
*
* Separators are normalized first: one "extension" is the path suffix
* `__dbt/wm_dbt.yaml`, which on Windows is spelled `__dbt\wm_dbt.yaml` and
* would match nothing — silently skipping every dbt project on that platform.
*/
export function hasScriptExt(p: string): boolean {
const norm = p.replaceAll("\\", "/");
return exts.some((ext) => norm.endsWith(ext));
}
export function removeExtensionToPath(path: string): string {
const norm = path.replaceAll("\\", "/");
for (const ext of exts) {
if (norm.endsWith(ext)) {
return path.substring(0, path.length - ext.length);
}
}
throw new Error("Invalid extension: " + path);
}
async function list(
opts: GlobalOptions & {
showArchived?: boolean;
includeWithoutMain?: boolean;
includeDraftOnly?: boolean;
json?: boolean;
}
) {
if (opts.json) log.setSilent(true);
const workspace = await resolveWorkspace(opts);
await requireLogin(opts);
let page = 0;
const perPage = 10;
const total: Script[] = [];
while (true) {View on GitHub (pinned to e474e8803c)
Solutions
- Pass a path ending in a recognized script extension (.ts, .py, .script.yaml, ...).
- Check that the file was not renamed to an unknown suffix.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at cli/src/commands/script/script.ts:1330 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/fde41c7338690301.
Report an issue: GitHub.