windmill-labs/windmill · error
file path must refer to a file.
Error message
file path must refer to a file.
What it means
Guard in `wmill resource-type push`: after stat(), the given path is not a regular file (it is a directory, symlink-to-dir, or special file), so its contents cannot be read and pushed as a resource-type definition.
Source
Thrown at cli/src/commands/resource-type/resource-type.ts:77
},
});
} else {
log.info(colors.yellow.bold("Creating new resource type..."));
await wmill.createResourceType({
workspace: workspace,
requestBody: {
name: remotePath,
...localResource,
},
});
}
}
type PushOptions = GlobalOptions;
async function push(opts: PushOptions, filePath: string, name: string) {
const fstat = await stat(filePath);
if (!fstat.isFile()) {
throw new Error("file path must refer to a file.");
}
const workspace = await resolveWorkspace(opts);
await requireLogin(opts);
log.info(colors.bold.yellow("Pushing resource..."));
await pushResourceType(
workspace.workspaceId,
name,
undefined,
parseFromFile(filePath)
);
log.info(colors.bold.underline.green("Resource pushed"));
}
async function list(opts: GlobalOptions & { schema?: boolean; json?: boolean }) {
if (opts.json) log.setSilent(true);
const workspace = await resolveWorkspace(opts);View on GitHub (pinned to e474e8803c)
Solutions
- Pass the path to the .resource-type.yaml/.json file itself, not its containing directory.
- Run `ls -l` on the path to confirm it is a regular file and not a directory or broken symlink.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/resource-type/resource-type.ts:77 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/250a9448c93281bd.
Report an issue: GitHub.