nexu-io/open-design · error · Error
Vela ${label} did not write the requested output file
Error message
Vela ${label} did not write the requested output file What it means
Thrown by readNonEmptyOutput() when stat() on the expected output file throws — meaning Vela's --output path was never created. The daemon tells Vela where to write the result (outputPath), then reads it back; a missing file means the CLI accepted the request but produced no output artifact.
Source
Thrown at apps/daemon/src/media/vela.ts:120
// A configured OD alias is already the provider-facing wire name. Only
// remove the catalogue namespace when the alias layer left the id intact.
if (wireModel !== model) return wireModel;
return model.startsWith('vela/') ? model.slice('vela/'.length) : model;
}
function extensionForImageMime(mime: string): string {
if (mime === 'image/jpeg') return '.jpg';
if (mime === 'image/webp') return '.webp';
if (mime === 'image/png') return '.png';
throw new Error(`Vela image returned unsupported mime_type ${mime}`);
}
async function readNonEmptyOutput(outputPath: string, label: string): Promise<Buffer> {
let outputStat;
try {
outputStat = await stat(outputPath);
} catch {
throw new Error(`Vela ${label} did not write the requested output file`);
}
if (!outputStat.isFile() || outputStat.size <= 0) {
throw new Error(`Vela ${label} wrote an empty output file`);
}
return readFile(outputPath);
}
function assertInputImageCount(imageRefs: VelaMediaImageRef[]): void {
if (imageRefs.length > VELA_MAX_INPUT_IMAGES) {
throw new Error(
`Vela media accepts at most ${VELA_MAX_INPUT_IMAGES} input images; received ${imageRefs.length}`,
);
}
}
async function stageInputImages(
imageRefs: VelaMediaImageRef[],
tempDir: string,View on GitHub (pinned to 5be4028344)
Solutions
- Run the same Vela command with --output <path> manually and check whether the file appears
- Verify the temp directory (os.tmpdir()) is writable and not full
- Check the Vela CLI version for known --output regressions
- Inspect Vela stderr/logs for write errors
Defensive patterns
Strategy: try-catch
Validate before calling
import { stat } from 'node:fs/promises';
async function outputExists(p: string): Promise<boolean> {
try { return (await stat(p)).isFile(); } catch { return false; }
} Try / catch
try {
const bytes = await readNonEmptyOutput(outputPath, label);
} catch (err) {
if (err instanceof Error && /did not write the requested output file/.test(err.message)) {
// rerun the vela command, or inspect stderr for the write failure
} else throw err;
} Prevention
- Confirm the temp directory is writable and has free space before the Vela call
- Capture Vela stderr so a missing-output failure has a diagnostic
- Pin the Vela CLI version and test --output behavior after upgrades
When it happens
Trigger: Vela image gen/edit or video command completed (returned JSON) but did not write to the --output path the daemon supplied. The label identifies which command (e.g. 'image gen', 'image edit').
Common situations: Vela CLI bug where --output is ignored under certain flags; permissions issue on the temp directory; the CLI wrote to a different path; disk full; the CLI was killed mid-write.
Related errors
- Vela ${label} wrote an empty output file
- Vela ${command} returned no JSON output
- Vela ${command} returned invalid JSON: ${detail}
- Vela image ${command} response is missing asset_id
- Vela image ${command} returned non-ready asset status ${stat
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/7585d7f837c25d6a.
Report an issue: GitHub.