Build succeeds but deployment fails with ENOENT export-detail.json error (Next.js App Router)

Expected: The deployment should complete successfully and go live, since the build itself finishes without errors.
Current: The build compiles and generates all pages successfully, but the deployment fails immediately after with:
Error: ENOENT: no such file or directory, lstat ‘/vercel/path0/.next/export-detail.json’
This happens right after “Traced Next.js server files in: XXms” in the build logs.

Build logs excerpt:
✓ Compiled successfully
✓ Generating static pages (28/28)
Traced Next.js server files in: 33.583ms
Error: ENOENT: no such file or directory, lstat ‘/vercel/path0/.next/export-detail.json’
What I’ve already tried (same error every time, no change in outcome):

  • Removed vercel.json entirely (no crons config) — same error

  • Tested with and without build cache — same error

  • Changed Node.js version from 24.x to 22.x — same error

  • Upgraded Next.js from 14.2.3 to 14.2.30 — same error

  • Confirmed output: ‘export’ is NOT set in next.config.js

  • Confirmed Framework Preset is explicitly set to “Next.js” (not “Other”)

  • Confirmed Build Command override is disabled (running default next build)
    next.config.js:
    /** @type {import(‘next’).NextConfig} */
    const nextConfig = {}
    module.exports = nextConfig

  • Framework: Next.js (App Router only, no pages directory)

  • Next.js version: 14.2.30 (also tested 14.2.3)

  • Node.js version: tested on 22.x and 24.x

  • Vercel CLI version (from logs): 54.19.0

  • Plan: Hobby

  • Deployment target: Production

  • Build output includes both static (○) and dynamic (ƒ) routes, including multiple App Router route handlers under app/api/…

Update: I recreated the Vercel project from scratch (same GitHub repo) and the error disappeared for 2 consecutive builds — got further into the pipeline (failed later on missing env vars, which I then fixed). However, the exact same ENOENT export-detail.json error just reappeared on a 3rd build, with the exact same code/config as the 2 successful ones. I also added an explicit “framework”: “nextjs” to vercel.json as suggested elsewhere, no change.

This strongly suggests the issue is intermittent/random on Vercel’s build infrastructure itself, not tied to any project-specific configuration. Would appreciate any insight into what’s happening during the “Traced Next.js server files” → export-detail.json lookup step internally.