Error: ENOENT: no such file or directory, open '.next/routes-manifest.json'

Deployment·Sep 12, 2026·intermediate·
Quick answer

This means the app is trying to start (`next start`) before a full `next build` has actually completed and produced a `.next` folder. Confirm your deploy pipeline runs `next build` first, and that no earlier step in the build silently failed before reaching it.

What causes this error

routes-manifest.json is generated by next build inside the .next directory. If next start (or your host's equivalent) runs against a project where the build never finished — or finished with errors that were ignored — this file won't exist, and Next.js fails immediately trying to read it.

The Fix

  1. Run npm run build locally and check the full output for errors, not just the final lines
  2. Confirm your deployment platform's build command is actually next build, not a typo or a cached/skipped step
  3. If deploying manually (not via Vercel), make sure the .next folder is actually included in what gets uploaded/copied to the server

Common causes / variations

  • A build step that errors out but the CI pipeline doesn't treat it as a failure
  • Using output: 'standalone' in next.config.js without copying the required standalone files to the deploy target
  • Running next start against a completely different directory than where the build actually ran

Related errors

See also: Module not found on Vercel (case sensitivity).

Was this fix helpful?

Comments

Loading comments...

Fix: ENOENT routes-manifest.json error in Next.js | BugFixer | BugFixer