500 runtime error in prod, but works in preview

I’ve created a project with the starter template from here: https://sanitypress.dev

  • It currently works if I run it locally using npm run dev.
  • I can run npm run build and npm start, and it also works.
  • npx vercel pull --environment=production and npx vercel dev also works.

When I deploy to Vercel, the build succeeds but the website itself seems to cause errors. You can check it here:
https://avtar-portfolio-6es7xq8ch-manpreetsls-projects.vercel.app
It says

Application error: a server-side exception has occurred while loading avtar-portfolio-6es7xq8ch-manpreetsls-projects.vercel.app (see the server logs for more information).

However, for some reason, Preview builds in Vercel work. But if I then ‘upgrade to production’ on one of those builds, I get the error from above again. Very strange.

Can someone help me out with this? I’m assuming that there’s some kinda config error on the Vercel dashboard but I’m not sure how to find it. I’ve checked the Environment Variables and everything seems okay.

Thanks for waiting, @manpreetsl. It looks like the site is working now. Do you still get that error message?