英文:
Next.js error in production mode - Digest: 1782794309
问题
I use Next 13.4.3. I don't have an API folder in the app folder as described here, by default all pages.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
Application error: a client-side exception has occurred (see the browser console for more information). Digest: 1782794309
And in the Chrome Debugger 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:
How do I find out where the error is?
英文:
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
> 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:
How do I find out where the error is?
答案1
得分: 1
检查服务器组件中的请求。你是否捕获查询错误?我认为 promise 被拒绝。
英文:
Сheck your requests in the server component. Do you catch query errors? I think the promise was rejected
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论