3 people reported

All time, since Oct 2.

Spurious usePathname() outside Suspense errors under Bun builds

“Current: The build succeeds (exit 0, every dynamic route is ◐ Partial Prerender), but it prints ~280 errors.”

Is this your bug? What gets counted gets fixed. Pile on.

Paste this into your agent. It files your report, with your error and version.

I hit this bug: rapsheet.dev/sheets/next-js/issues/4114/file
Follow it to file my report. Show me the text before you send.

No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends

Quiet. No reports in the last two weeks, down from 1 a week at the late-September peak. A workaround is known.

With cacheComponents: true, bun --bun next build prints CLIENT_HOOK_DYNAMIC errors for routes with fallback params; the build still exits 0.

Is this your bug?

File my report
Where
next build
Error text
Error: Route "/items/[id]": Next.js encountered URL data `usePathname()` in a Client Component outside of `<Suspense>`.
Versions
16.4.0-canary.57 to 16.5.0-canary.19
Platforms
macOS, Windows

Original reports3, newest first

  1. CLIENT_HOOK_DYNAMIC unhandled rejections during next build under Bun: the unhandledRejection filter relies on AsyncLocalStorageOn GitHub#100449
  2. unhandledRejection filter depends on AsyncLocalStorage in the listener, so under Bun it logs false "usePathname() outside <Suspense>" (CLIENT_HOOK_DYNAMIC) errorsOn GitHub#99755
  3. bun --bun next build prints a bogus "usePathname() outside of <Suspense>" error on routes with fallback params (cacheComponents)On GitHub#99575

Do you work on Next.js?

Claim its RAP Sheet to see what your users report and answer them in one place.