#Deploy starter store front

14 messages · Page 1 of 1 (latest)

heady perch
#

has anyone been able to properly build and deploy the starter store front?
i have been trying to do this for a couple of days now and i always get fetch failed error on build. my guess is its a nextjs issue but i would love some insight on how to fix that problem when deploying the starter store front.

signal turtle
#

hi. could you share the errors you get?

heady perch
hexed thunder
#

Where are you trying to deploy? What is the value of MEDUSA_BACKEND_URL env variable?

Where do you have the backend deployed?

It seems the build is failing while trying to generate static params for the collection detail pages. Specifically, by making a request to a 'store_backend' hostname it can't find.

My guess is you have your backend url misconfigured.

heady perch
# hexed thunder Where are you trying to deploy? What is the value of MEDUSA_BACKEND_URL env vari...

i am deploying on company servers. the value of medusa_backend_url is the "store_backend". it used to be the domain name that was allocated for the backend. but i had a feeling that the reason that the build was failing was because nginx is responsible for building the store front and serving the backend too. so i was trying to send requests to the container for the backend. deploying on vercel works however

#

and i checked the urls. they seem to be correct'

hexed thunder
#

So for your company server You are deploying storefront and server through Docker. If that is the case i would make sure the backend is fully ready before the storefront build starts.

Also, i am not so profficient in Docker, but that store_backend value is not being resolver as a valid host

heady perch
pine canopy
bronze grotto
heady perch
#

@bronze grotto @pine canopy thanks guys. I already fixed it but i really appreciate the help

pine canopy
heady perch
pine canopy
#

o.o
that's a good approach.
better than having to wait for the backend to start then do the frontend.