Skip to content

Comments

fixed no suspense error with searchparams#12

Merged
safipatel merged 1 commit intomainfrom
fix-suspense-search-params
Feb 26, 2025
Merged

fixed no suspense error with searchparams#12
safipatel merged 1 commit intomainfrom
fix-suspense-search-params

Conversation

@safipatel
Copy link
Contributor

@safipatel safipatel commented Feb 26, 2025

FYI this error only shows up at npm build time, so we aren't aware of it.
https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
Had to fix it in this manner: vercel/next.js#61654 (reply in thread)
@chenxin-yan

Retrying 1/3...
 ✓ Compiled successfully
   Linting and checking validity of types ...
   Collecting page data ...
   Generating static pages (0/10) ...
   Generating static pages (2/10) 
 ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/auth/unauthorized". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
    at a (/app/.next/server/chunks/393.js:1:3531)
    at f (/app/.next/server/chunks/393.js:1:20057)
    at i (/app/.next/server/app/auth/unauthorized/page.js:1:3026)
    at nO (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:45959)
    at nI (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47734)
    at nL (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:65533)
    at nN (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:63164)
    at n$ (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:46311)
    at nI (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47780)
    at nI (/app/node_modules/.pnpm/next@15.1.7_@babel+core@7.26.9_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:62515)
Error occurred prerendering page "/auth/unauthorized". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /auth/unauthorized/page: /auth/unauthorized, exiting the build.
 ⨯ Next.js build worker exited with code: 1 and signal: null```

@safipatel safipatel merged commit fb5cf14 into main Feb 26, 2025
1 check passed
@safipatel safipatel deleted the fix-suspense-search-params branch February 26, 2025 20:49
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

Successfully merging this pull request may close these issues.

1 participant