Getting 500 internal server error - Nextjs

For some reason my application is getting 500 errors when deployed, works fine when building and running locally but fails in production.

When i check the logs i get this:
{
  "truncated": false,
  "outcome": "ok",
  "scriptName": "pages-worker--2194227-production",
  "diagnosticsChannelEvents": [],
  "exceptions": [],
  "logs": [
    {
      "message": [
        "Error: An error occurred while evaluating the target edge function (__next-on-pages-dist__/functions/src/middleware.func.js)"
      ],
      "level": "error",
      "timestamp": 1726567894480
    }
  ],
   // ... rest is attached in json file
}


The build logs seem to be totally fine so not sure what is up

Links:
https://github.com/jacobsamo/buzztrip
https://buzztrip.co
https://buzztrip.pages.dev
https://0c1dc957.buzztrip.pages.dev
GitHub
Plan the trip you've always dreamed of. Contribute to jacobsamo/BuzzTrip development by creating an account on GitHub.
Was this page helpful?