#storefront build failing
1 messages · Page 1 of 1 (latest)
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
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?
Store is eunning
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
have you checked the message which the error provided: https://nextjs.org/docs/messages/static-page-generation-timeout
kosek so tldr:
- storefront works fine in development mode
- backend also working fine
- 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
- at this point I restart the backend
- 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
warn - Restarted static page generation for /products/leviot-smart-thermostat because it took more than 60 seconds
Is it local database?
its local database postgres
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?
yes I checked the link
have you customised the nextjs starter?
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
It might help, yes.