This error keep showing me whenever i run `npm run build`
Unanswered
Sloth bear posted this in #help-forum
Sloth bearOP
⨯ useSearchParams() should be wrapped in a suspense boundary at page "/404". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
at a (C:\Users\ashut\OneDrive\Documents\sryzenmain\.next\server\chunks\310.js:5:40823)
at f (C:\Users\ashut\OneDrive\Documents\sryzenmain\.next\server\chunks\310.js:3:19601)
at i (C:\Users\ashut\OneDrive\Documents\sryzenmain\.next\server\app\_not-found\page.js:1:996)
at nL (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:46773)
at nF (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:48548)
at nF (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:64360)
at nq (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:67434)
at nH (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:65009)
at nV (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:70865)
at nz (C:\Users\ashut\OneDrive\Documents\sryzenmain\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:69548)
Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /_not-found/page: /_not-found, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
1 Reply
Brown bear
The issue is exactly what the stack trace is telling you. You have a component that is using
useSearchParams()
and that component needs to be wrapped in a Suspense