Vercel deployment: e-commerce template

default discord avatar
.alp3nlast year
2

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.

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

  • default discord avatar
    .alp3n12 months ago

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

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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