Adding payload to an existing next 13 project

default discord avatar
ggphntms_62927
4 weeks ago
6

Hey, has anyone tried adding payload to an existing next 13 project? Ran into a bunch of type errors using the installation guide

https://payloadcms.com/docs/getting-started/installation

, and /admin 404s.

  • default discord avatar
    trugamr
    4 weeks ago

    This might help you understand different approaches that you can take to use Payload with Next.


    https://payloadcms.com/blog/the-ultimate-guide-to-using-nextjs-with-payload
  • default discord avatar
    ggphntms_62927
    4 weeks ago

    nice - this template

    https://github.com/payloadcms/payload/tree/main/templates/website

    got me further than I ever had before, but still not great - lots of dependency conflicts, and the project froze multiple times. Gonna keep plugging away.

  • default discord avatar
    trugamr
    4 weeks ago

    This template was kinda overwhemling for me, so I created a new next app and tried to understand all bits and pieces of how custom server ties payload and next together.


    https://github.com/Trugamr/next-payload


    Minimal setup to work with Payload Local API in Next and it's working fine for me in a work project.



    Maybe this can help you 😀

  • default discord avatar
    macca98
    4 weeks ago

    I would suggest you to take a look to this guide

    https://github.com/payloadcms/next-payload

    and also look at [this thread](

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

    ) to solve db and editors problems.



    Also, if you're following this guide pay attenction on whether or not having the "src" folder.



    Also make sure you have a version-control/backup of your project before proceeding

  • default discord avatar
    trugamr
    4 weeks ago

    This would be my go-to method. I was personally running into some webpack problem due to which I had to clear my

    .next

    folder multiple times and few broken admin dashboard styles here and there.



    I am excited for this new direction payload is going in though 😃

  • default discord avatar
    ggphntms_62927
    3 weeks ago

    This is what I ended up doing. Not especially straightforward, but it did work in the end 🙂

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.