#storefront build failing

1 messages · Page 1 of 1 (latest)

river bear
#

I'm running the server also in local and it works.

#

I mean in npm run dev, storefront is working fine

#

but during build I'm getting timeout

#

After I run the build in storefront, my medusa server also stops working, I need to restart the medusa server

rapid condor
#

Are you sure you have the server running where you are (supposedly) fetching the data from? Looks like the call in getStaticProps is timing out? In case you are fetching the data from medusa server are you sure it is up and running while you build your storefront?

river bear
#

I mean the backend is running

#

I can use it with npm run dev in storefront.

#

But when I build storefront
Server stops working, i mean then I have to restart the server and it works in npm run dev

#

I m using fakeredis

#

I may just hide the dev server loading indicator and use it with dev 🤕 as last resort

limpid pier
river bear
#

kosek so tldr:

#
  1. storefront works fine in development mode
#
  1. backend also working fine
#
  1. i am running npm run build, when it starts generating the pages in next
#

backend stops working, but it is showing no logs

#

I mean it just gets stuck

#
  1. at this point I restart the backend
#
  1. With npm run dev now it works again fine. But
#

Basically if I build, backend stops working, and storefront build fails

#

in dev mode it works fine.

#

But in logs I get 401 error tho

#

in dev mode storefront

limpid pier
#

That 401 error is irrelevant

#

Does your database have some limits?

river bear
#

warn - Restarted static page generation for /products/leviot-smart-thermostat because it took more than 60 seconds

limpid pier
#

Is it local database?

river bear
limpid pier
#

To be honest I had this issue yesterday on my production website, but I'm doing a lot in getStatciProps

#

It eventaully went through

#

Have you checked the link?

river bear
#

yes I checked the link

limpid pier
#

have you customised the nextjs starter?

river bear
#

yes little bit but its just minor css changes etc.

#

I'll try to get fresh starter also and see if it builds

#

kosek, I'm not having redis tho, if thats the case?

#

Its fakeredis

limpid pier
#

It might help, yes.