Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useSearchParams() should be wrapped in a suspense boundary #23

Closed
wbleonard opened this issue Feb 7, 2024 · 2 comments
Closed

useSearchParams() should be wrapped in a suspense boundary #23

wbleonard opened this issue Feb 7, 2024 · 2 comments

Comments

@wbleonard
Copy link

wbleonard commented Feb 7, 2024

I'm receiving the following error during the static page generation for /, reset-password, and login when running 'docker compose build':

28.83    Generating static pages (0/16) ...
29.55
29.55  ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/reset-password". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
29.55
29.55 Error occurred prerendering page "/reset-password". Read more: https://nextjs.org/docs/messages/prerender-error
29.55
29.56  ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
29.56
29.56 Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
29.56
29.56
   Generating static pages (4/16)
   Generating static pages (8/16)
29.70
29.70  ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/login". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
29.70
29.70 Error occurred prerendering page "/login". Read more: https://nextjs.org/docs/messages/prerender-error
29.70
   Generating static pages (12/16)
 ✓ Generating static pages (16/16)
30.28
30.28 > Export encountered errors on following paths:
30.28 	/login/page: /login
30.28 	/page: /
30.28 	/reset-password/page: /reset-password
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
@Jibola
Copy link
Collaborator

Jibola commented Feb 9, 2024

Thanks for opening up this issue @wbleonard. We've gone ahead and filed a JIRA task. Please check here to track the progress of this issue.

@scattered-development
Copy link
Contributor

scattered-development commented Feb 16, 2024

Had the same issue, its due to a minor update to one of the dependencies, not sure which one I just locked them all down to the exact versions and got the example working. Before that I tried wrapping in suspense boundaries but with no joy, might be due to my poor frontend skills, but did find a case in this thread where useSearchParams() was not in use but the error was still thrown https://www.reddit.com/r/nextjs/comments/1akleto/usesearchparams_should_be_wrapped_in_a_suspense/?rdt=33287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants