Next.js Discord

Discord Forum

Unable To Retrieve JSON Data While Using Dynamic Routes

Unanswered
Pollock posted this in #help-forum
Open in Discord
PollockOP
Using the exact same code to render two different pages, one of which is a static route, and the other a dynamic route. The static route retrieves the JSON data, which is a local file located at /app/lib, using a imported function. It then displays it onto the page no problem. However I keep getting the following error for any dynamic routes:
Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.

This issue is only perpetuated while using the live site, and does not appear while using Next.js' liveserver (I'm not quite sure what it's called, but you get the idea, it runs on the localhost.

If anyone has even a shred of an idea of what is happening, please reply with your thoughts. This is one of those almighty bugs that has haunted me for days. Thanks!

2 Replies

PollockOP
bump
PollockOP
bump