4

I use Next 13.4.3. I don't have an API folder in the app folder as described here, by default all pgaes.tsx etc. are in the app folder SSR: https://nextjs.org/docs/app/building-your-application/routing/router-handlers. In my main page /app/page.tsx I do a fetch when called to load data from MongoDB (app/products/route.ts). Everything works locally as soon as I switch to production mode, I get the error below

enter image description here

Application error: a client-side exception has occurred (see the browser console for more information). Digest: 1782794309

And in the Chrome Debuger Console:

139-fafe6b4f143efdb1.js:1 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.

if i click on 139-fafe6b4f143efdb1.js i got this:

enter image description here

How do I find out where the error is?

Captai-N
  • 1,124
  • 3
  • 15
  • 26

1 Answers1

1

Сheck your requests in the server component. Do you catch query errors? I think the promise was rejected

[1]: https://i.stack.imgur.com/6XJ4C.png

  • @SeungHwan check it – solexofficial Jun 30 '23 at 11:20
  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34622340) – juliomalves Jul 02 '23 at 15:56