Vercel deployment: e-commerce template

default discord avatar
2 months ago

Hey everyone,

I have a problem with deploying e-commerce template to Vercel. Locally everything works, but on Vercel my page showing 404. The only error I get is that it can't fetch '/api/users/me'. Body of the homepage shows default nextjs 404 page (header and footer are built but they dont need data from CMS for now so no fetch here). There is no page for '/admin' it shows 404 but this time its custom page.

Do I need to adjust build commands for Vercel to build and start the api first? If yes then what is the correct process 🙂 ?

Previously I used nextjs-payload on custom-server on Vercel and everything went smooth.

  • discord user avatar
    Payload Team
    2 months ago

    Vercel does not allow the hosting of custom servers. The ecomm template uses a custom server.

  • default discord avatar
    2 months ago

    Oh thank you, I don't know why but I was so sure it was serverless like nextjs-payload template 😅

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


Connect with the Payload Community on Discord



Can't find what you're looking for?

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