Hello, everyone, hello Payload
i've been trying to deploy my payload website on netlify for a while now but i haven't had any luck. this is the error i've been getting is on the image.
The link to my slug.tsx is here :
and as the issue might be with my envs , heres a link to the example.env which is more or less what i'm using :
please, i really need help on this
Have you added your envs in netlify? Issue might be that your fetch doesnt receive the env vars for server url.
yeah i tried that. it's still the same error
i've added the variables, the error i'm getting now is this
you are trying to build a static site, deploying next and payload on the same server
chicken and egg problem
The next and payload deployed as 1 only works when using SSR. Can you tell me what your setup is, are you attempting to deploy nextand
payload on netlify?
i'm just trying to get it online so I can view it in production. railway, vercel, netlify. doesn't matter to me right now.
@jarrod69420 is it impossible to deploy both on the same server ?
Its possible but what you tryin to do is not possible.
1) app starts build
2) app requires some data from basically itself on the /api route
3) fails cause it cant request data from itself before building and running
So what do you suggest will work
Use getserversideprops instead of static
Yep, you can check out this repo:https://github.com/payloadcms/nextjs-custom-server