Next.js Discord

Discord Forum

Error when build: ⨯ useSearchParams() should be wrapped in a suspense boundary at page

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
Hello,

I'm working on a project that use refine and Next.js 14.2.11, all is fine in dev mode but when I'm trying to build the project I got the error in related attachments (error-reported.png).

I just disable missingSuspenseWithCSRBailout flag in next.config.js but I want to understand what is happening. Attached my page and part of component, any sugestion or help I will be so many gratefully.

9 Replies

Eastern yellowjacket
you need to add a loading.tsx file
@Eastern yellowjacket you need to add a loading.tsx file
thanks for your confirmation
@Spectacled bear solved?
Spectacled bearOP
@B33fb0n3 nope, that is strange :/ I'm taking a deep learn to understand what is happening, maybe refine needs a PR with the solution
Spectacled bearOP
@B33fb0n3 yes!