Environment
- Next.js 14.2.35, hybrid App Router + one Pages Router API route (pages/api/export/pdf.ts — required for react-dom/server, which fails under App Router's react-server condition)
- No
output: 'export'in next.config.mjs — no static export configured anywhere in the app
Error Error: ENOENT: no such file or directory, lstat '.next/export-detail.json'
Thrown by Vercel's build step immediately after next build completes successfully.
What I've confirmed
next buildexits 0, both locally and on Vercel's remote builder — all pages and functions listed, no build errors.next/export-marker.jsonis present and correctly reports "hasExportPathMap": false — the app has no static export configured, soexport-detail.jsonshouldn't be expected.next/export-detail.jsonis not produced, consistent with that marker- Reproduces identically across every variable I could think to test:
- original project AND a brand-new project created fresh for this test (rules out project-level settings)
- Node 20.x and Node 24.x
- remote builder v58.4.0 and local
vercel buildv53.2.0 - with/without build cache, with/without .vercelignore, with/without outputFileTracingIncludes in next.config.mjs
- vercel.json unchanged from a deploy that got past this exact step
- Dashboard Build & Development Settings have no overrides — Framework Preset correctly detected as Next.js, Build Command/Output Directory/Install Command all default
One thing I can't explain myself An earlier deploy on this project did get past this build step (it failed later, on an unrelated function-size limit). I haven't been able to identify what changed since then that would make the builder start expecting this file.
Happy to share a minimal repro repo if that's useful.