Next.js Discord

Discord Forum

Possible bug found for SSG due to Next 14 server caching behaviour.

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
Hello everyone, I am programming a chef webpage that needs internationalization, so I am using SSG to prerender all pages for each locale.
I am finding problems in build time while trying to build server components that fetch data from my backend, this problems are only there if the data from the backend is cached, if I opt-out caching or dont use SSG or simply just run dev mode there is no problems, but caching behaviour is blocking the database requests and always gets me a MongoNotConnectedError: Client must be connected before running operations...
I checked it already and it is not a db problem, because as I said if I opt out from caching there is no issues at all and all runs as expected. The problem is then that every data fetch from the server would be dinamically rendered and cache is then useless.

Any one has an idea about what is happening, photos are attached to the post?:lolsob:
Thank you in advance!

Jose

0 Replies