Getting 500 error after deploying my NextJS app to Cloudflare Pages.
I am using NextJS v14
I followed all the step here: https://github.com/cloudflare/next-on-pages/tree/main/packages/next-on-pages#quick-start
When I run
npx @cloudflare/next-on-pages
locally I get no error and a .vercel
dir is generated.
I have also found these tutorials
- https://www.youtube.com/watch?v=A49jpNN4omY
- https://www.youtube.com/watch?v=Ouny4LKe3UM
In the tutorials they also install wrangler
and vercel
packages as well as modify the versions of the packages. I have tried this but get the same 500 result.
Any suggestions?1 Reply
Forgot to mention, the deployments are successful, but visiting the project url shows a NextJS 500 error page.
Nvm, I had to set the env variables for the Prod env
I have only set them for the Preview env