Skip to content
LavaFlowPreview

Project:shop

Docs (opens in a new tab)

Error: ENOENT: no such file or directory

Diagnosis

Uploads fail on a fresh instance.

Root cause

The upload handler writes to /tmp, which a new instance doesn't have yet.

Evidence

  • LOGError: ENOENT: no such file, open '/tmp/upload'

    2026-10-27T10:01:44Z

Confidence: Medium

Files

  • src/upload.js

Suggested fix

Create the directory before writing.

Create the upload directory before writing

src/upload.js
Removed: await writeFile(path, body);Added: await mkdir("/tmp/upload", { recursive: true });Added: await writeFile(path, body);