Deploying NextJS custom server template to Cloud

default discord avatar
gbrl
last month
8

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
  • default discord avatar
    Alessio 🍣
    last month

    could you share the error you're getting?

  • default discord avatar
    gbrl
    last month

    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)?

    Screen_Shot_2023-04-04_at_13.09.08.png
  • discord user avatar
    jesschow
    Payload Team
    last month

    Hey @gbrl - 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

    .

    Screen_Shot_2023-04-05_at_12.12.22_PM.png
  • default discord avatar
    markle
    last month

    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.

    Screen_Shot_2023-04-27_at_4.52.03_PM.png
  • discord user avatar
    jesschow
    Payload Team
    4 weeks ago

    Related thread here

    https://discord.com/channels/967097582721572934/1100794913790107648

    Our nextjs-custom-server template might need some tweaks to deploy on cloud, sounds like @denolfe is on the case 🔍

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.