Internal Server Error after deploying headless sxa nextjs website for Sitecore XM Cloud



  1. Sitecore XM Cloud
  2. Sitecore SXA website
  3. Sitecore Experience Edge
  4. Headless JSS, Nextjs framework

Steps to reproduce:

  1. Created SXA website using Sitecore XM Cloud portal (default basic website)
  2. Created Experience Edge API
  3. Noted down environment variable: JSS_APP_NAME, SITECORE_API_KEY, GRAPH_QL_ENDPOINT (
  4. Created a new site in Netlify using GitHub project (GitHub project is created by Sitecore XM Cloud in my private repository)
  5. Setup environment variable mentioned above.
  6. Configured Publish folder to src/sxastarter/.next
  7. Configured Runtime environment to Nextjs
  8. Deployed successfully

After browsing the website(have only 2 initial pages: home and home/about) I see Internal server error. Checking the logs I saw the Sitecore pages are redirected to “/.netlify/builders/___netlify-odb-handler” and I am not sure what is causing 500 issue.
I have tried same on Vercel and site is rendering without any issue.

Please let me know what I am missing here or if more information is required regarding error. I won’t be able to give repository details.


If you share the site name we can probably guide better, but if I were to take a wild guess, it’s probably because of the ongoing issues with Next.js on Netlify and would be fixed in the upcoming Next.js Runtime.

Hi @hrishikesh

This is the site:
Any ETA around resolution?


Just confirmed, you’re running into: This is already fixed in the new runtime which is currently in private beta. The sooner the important bugs are fixed, the sooner it would be released, though our estimate is by Q1 2024.

Thanks Hrishikesh for prompt response.