Next.js Discord

Discord Forum

Getting errors while trying to build locally

Unanswered
Pritam_045 posted this in #help-forum
Open in Discord
While building the application locally, I get the same error for the 4 pages.

Errors are:
1. Error occurred prerendering page "/orders". Read more: https://nextjs.org/docs/messages/prerender-error
2. ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout

I have posted the images on which pages I got those errors. If anyone can help me with this please help.

https://github.com/PrtHub/elegent

4 Replies

American Crow
add a loading.tsx to /products and /orders

or wrap the components which useSearchParams individually with React's <Suspense>
Hey, I got same errors
there are links in the error messages. read them