sanity-io/demo-course-platform

Preview mode in production on Vercel returns error 500 in console log

Closed this issue · 0 comments

As the title says, trying to figure out what could be the cause. On localhost in dev & prod mode I don't get this error. Once deployed to the production on Vercel and preview mode is activated I get error 500 and all the links on a page return 500.

This is the error:

Error: invariant: Expected pageData to be a string for app data request but received undefined. This is a bug in Next.js.
    at NextNodeServer.renderToResponseWithComponentsImpl (/var/task/node_modules/next/dist/server/base-server.js:1289:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NextNodeServer.renderPageComponent (/var/task/node_modules/next/dist/server/base-server.js:1348:24)
    at async NextNodeServer.renderToResponseImpl (/var/task/node_modules/next/dist/server/base-server.js:1380:32)
    at async NextNodeServer.pipeImpl (/var/task/node_modules/next/dist/server/base-server.js:641:25)
    at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:1158:21)
    at async Router.execute (/var/task/node_modules/next/dist/server/router.js:315:32)
    at async NextNodeServer.runImpl (/var/task/node_modules/next/dist/server/base-server.js:615:29)
    at async NextNodeServer.handleRequestImpl (/var/task/node_modules/next/dist/server/base-server.js:546:20) {
  page: '/algemene-voorwaarden'
}
RequestId: d180bbff-403c-4243-8dfc-46a3e8340d39 Error: Runtime exited with error: exit status 1
Runtime.ExitError

Is this fixable or a known bug in the demo-course-platform?