React Router app deploys successfully but returns 500 error on access

Hi team,
My React Router project recently deploys successfully on Vercel, but the deployed site shows a 500 error when accessed:

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED
ID: iad1::9mzx2-1761741964954-b9ba1575dd91

The server logs display this message:

Cannot find module '/var/task/node_modules/@mjackson/node-fetch-server/dist/node-fetch-server.cjs'
Did you forget to add it to "dependencies" in `package.json`?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.

However, this error occurs even though I haven’t changed anything related to dependencies. The latest code runs normally in my local machine.

To verify, I reproduced the issue using the official React Router boilerplate template and can see the same ā€œcannot find moduleā€ error in the logs.
Code: React Router Boilerplate
Deployed: https://test-rr-one.vercel.app/

1 Like

Hi team,

Thanks for reporting this error @gregoryzeng!
We experience the same issue, yesterday the very same builds were working perfectly and today we have this error as well!

Thanks for reporting this. We’re investigating similar reports now

We are having the same exact issue.
Is there any updates?

@gregoryzeng @minimarcel @team-9091 We just shipped a fix. Can you redeploy and let me know whether or not it works for you now?

It works for us! Thanks!

1 Like

It’s working now. Thanks for the quick support!

1 Like

hey guys! I’m still getting this issue when deploying using the vercel cli, just updated using npm i -g vercel@latest but still getting the same issue where the build and deployment succeeds but any request results in a 500 with: Cannot find module ā€˜/var/task/node_modules/@mjackson/node-fetch-server/dist/node-fetch-server.cjs’