Production down — React Router 7 SSR function crashes

Production down — React Router 7 SSR function crashes: ERR_MODULE_NOT_FOUND for react-router/dist/development/index.mjs

Severity: Production outage — no working deployment to roll back to
Plan: Hobby
Project: https://vercel.com/chunk-creations/model-box-app
Failing deployment: https://vercel.com/chunk-creations/model-box-app/HZpBK72oiF6KdqTghZp1b3xDLm4D
Regression observed from: 2026-05-18 18:23:18 UTC (deploy of merge commit 6bfefb156fab835e13f60c9d96117255c8bf5c2b)


Summary

Since 2026-05-18 ~18:23 UTC, every deployment of our React Router 7 SSR
app crashes at runtime with FUNCTION_INVOCATION_FAILED. The serverless
function cannot find react-router/dist/development/index.mjs — that file is
imported by the builder-generated server-index.mjs but is not traced into
the deployed function bundle
.

This is not a code regression: I checked deployments as far back as
May 14 — every one of them, including previously-working immutable
deployments, now crashes identically. They all worked before the timestamp
above. When all immutable historical deployments fail simultaneously, the cause
is a platform/builder-side change, not our code — and it means we have no
working deployment to roll back to
.

Error (runtime, cold start)

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/react-router/dist/development/index.mjs' imported from /var/task/apps/app/build/server/nodejs_eyJydW50aW1lIjoibm9kZWpzIn0/server-index.mjs
    at finalizeResolution (node:internal/modules/esm/resolve:281:11)
    at moduleResolve (node:internal/modules/esm/resolve:871:10)
    at moduleResolveWithNodePath (node:internal/modules/esm/resolve:997:14)
    at defaultResolve (node:internal/modules/esm/resolve:1040:79)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:719:20)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:736:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:765:52)
    at #resolve (node:internal/modules/esm/loader:701:17)
    at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:621:35)
    at ModuleJob.syncLink (node:internal/modules/esm/module_job:160:33) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///var/task/node_modules/react-router/dist/development/index.mjs'
}
Node.js process exited with exit status: 1.

The build succeeds; the crash is at function invocation / cold start.

Diagnosis

  • server-index.mjs is generated by Vercel’s builder (the @vercel/react-router
    npm package is only a config preset — it writes a manifest and does not
    generate the function entry). So the failing import is in builder-produced
    code, not ours.
  • react-router@7.13.1’s package.json exports["."] resolves the module-sync
    condition to ./dist/development/index.mjs. This is the canonical entry —
    both dist/development and dist/production ship in the package.
  • Node honors the module-sync condition from 22.0.0 (backported to
    20.19.0). I verified locally (Node v24): import.meta.resolve('react-router')
    resolves to dist/development/index.mjs — exactly the file the function
    cannot find.
  • So the runtime correctly asks for index.mjs, but the builder’s file tracer
    did not package index.mjs into the Lambda. This is a file-tracer ↔
    runtime export-condition mismatch
    .
  • Likely trigger: our engines.node is an unpinned ">=20.9.0" range
    (Vercel’s build log warns it “will automatically upgrade when a new major
    Node.js Version is released”). A Vercel-side Node bump appears to have flipped
    resolution onto the module-sync .mjs entry that the tracer doesn’t ship.

What I’ve already tried

  • Bumped @vercel/react-router 1.2.6 → 1.3.0 and redeployed → identical
    crash
    (expected — server-index.mjs is builder-generated, not from the npm
    preset).
  • Set NODE_ENV=production in project env → no change.
  • Not fixable by Node version: every Node version Vercel offers (20.19+, 22)
    honors module-sync, so the runtime resolves .mjs regardless.
  • Not fixable by pinning react-router: the module-sync.mjs
    condition is present in every recent 7.x release (checked 7.11 / 7.12 /
    7.13.0 / 7.13.1 — identical).
  • Not using React Router middleware — this is distinct from issue #13327.

Environment

  • React Router 7.13.1 (react-router, @react-router/node,
    @react-router/serve, @react-router/fs-routes, @react-router/dev)
  • @vercel/react-router 1.2.6 (also tried 1.3.0)
  • Monorepo: Turborepo + Bun workspaces; app at apps/app
  • vercel.json: framework: "react-router",
    installCommand: "cd ../.. && bun install",
    buildCommand: "cd ../.. && bun run build --filter=@modelbox/app",
    outputDirectory: "build"
  • engines.node: ">=20.9.0"

Ask

Is there a known regression in the React Router builder / serverless-function
file-tracing currently rolling out across the build fleet? Production is fully
down with no rollback path. Happy to provide additional build IDs or a minimal
reproduction.

+1 we’re facing the same

We’re experiencing the same issue

Likewise, same as described above.

We started noticing this issue out of nowhere today in between a successful deployment at 1:56PM EDT and a deployment at 3:33pm EDT that presented the failure. We did have a previous deployment to rollback to, and that was successful, but we cannot make additional deployments (even the most trivial of changes) without the new vercel functions crashing.

Experiencing the same issue

Same issues on all new builds

Thanks for reporting, we are investigating right now

Experiencing the same issue

I am having the same problem here

We are rolling out the fix now, if you redeploy your projects they should be back up and running properly. The team is continuing to investigate and we’ve updated the status page to track this https://stspg.io/6knpl12q53h5

Confirmed working again on our end. Thank you for the quick resolution.

I can confirm it’s working for my app after redeploy. Thanks!

I understand this issue is resolved. However, we are experiencing the exact same issue in Preview deployments today. Do we need to do anything to fix this issue on our side?

We’ve been facing this issue the entire day in both production and preview.

This issue does not seem to be resolved yet. Experiencing it with Production deployments a few mins back.

Earlier, faced it in Preview which got fixed in a few hours. So, created Production deployment but now faced same issue there. Rolled back successfully. For now, cannot create additional deployments.

I’m also facing the same error, someone solved it?

Hey Riz, now it’s working production deployments for you? Or still nothing?

@joao-2010 @viniciuscostabcanvas @rizzafar-2128 Could you try again now? We’ve made some changes

It is working now. Tested both on Preview and Production a few mins back, around 4am UTC. Thanks everyone!

Is this still an issue? I know it’s marked solved, but between 3 and 5pm eastern time today, I had several deploys fail with this same error. It seems inconsistent, I had 2 deploys fire at the same time, one seems to be just fine, the other threw the error OP posted about.