Vercel build logs or `npm run build`

useSearchParams() should be wrapped in a suspense boundary at page "/…".

What it means
A client component reads URL query parameters with `useSearchParams()`, and Next.js needs a `<Suspense>` wrapper around it so the rest of the page can load immediately.
Likely causes
  • Using useSearchParams() in a client component without wrapping that component in <Suspense fallback={...}> in its parent page.
  • Testing only with npm run dev (which doesn't pre-build pages) instead of running npm run build before pushing.
Prevention
Run npm run build locally before opening a pull request to catch static build checks early.

Copy for your agent

The build failed with `useSearchParams() should be wrapped in a suspense boundary`. Wrap the component that calls `useSearchParams()` in `<Suspense>` and verify with `npm run build`.

Full help articleThe Vercel build failed

Last reviewed Nov 8, 2026