#Deploying NextJS custom server template to Cloud

8 messages · Page 1 of 1 (latest)

stark hound
#

I tried deploying the payloadcms/nextjs-custom-server template to the cloud, but I'm getting a build error. I understand it's currently supported - is there a trick I'm missing?

https://github.com/payloadcms/nextjs-custom-server

GitHub

A TypeScript boilerplate for combining Payload and NextJS into a single Express server - GitHub - payloadcms/nextjs-custom-server: A TypeScript boilerplate for combining Payload and NextJS into a s...

manic berry
#

could you share the error you're getting?

stark hound
#

it's failing during the first build, unless I'm missing something I'm not able to see the logs.

#

I might be setting the wrong environment variables? Also after this process fails, is there a way to re-trigger builds (ie after updating env vars)?

modern tundra
#

Hey @stark hound - on the page before deployment, did you update the 'Branch to deploy' to master? It is set to main unless you change it - and the default branch for the nextjs-custom-server repo is named master.

jagged phoenix
#

Even when selecting the correct branch to deploy, the build fails.

#

Build logs shows that it gets pretty far, but the build shows as failed.