My Next.js 16 build completes successfully but fails during file tracing with this error:
Error: ENOENT: no such file or directory, open ‘/vercel/path0/.next/server/app/_global-error.rsc’
Environment:
Next.js: 16.0.10 (Turbopack)
Build completed successfully with all 51 pages generated
TypeScript compilation passed
Build region: Washington DC (iad1)
Has anyone encountered this issue with Next.js 16 on Vercel? Do I need to create a global-error.tsx file in my app directory, or is this a build configuration problem?
This was a tough one, it comes from having experimental.staticGenerationRetryCount: 0 set in your next.config
When staticGenerationRetryCount: 0 is set, Next.js 16 changes how it handles static generation for internal routes like /_global-error. The route gets added to prerender-manifest.json with a dataRoute: “/_global-error.rsc”, but the actual .rsc file is never generated because static generation is effectively disabled (0 retries = no generation)
The Vercel build process expects these files, so next build succeeds but vercel build fails. We should update the Vercel CLI to either reject the incompatible config or support this case
You can either delete that line from your config or set it to 1 or higher
Hey there, @karthiknish! Just checking in on your Next.js build issue with the ENOENT error. Have you found a solution, or do you still need some help? Excited to help!