nextjs - 💡(How to fix) Fix [Turbopack] Excessive Fast Refresh rebuilds when dev server runs on Bun runtime [9 comments, 10 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#89530Fetched 2026-04-08 02:02:41
View on GitHub
Comments
9
Participants
10
Timeline
20
Reactions
14
Timeline (top)
commented ×9subscribed ×8cross-referenced ×1issue_type_added ×1

Code Example

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 65378
  Available CPU cores: 28
Binaries:
  Node: 22.14.0
  npm: 11.5.2
  Yarn: N/A
  pnpm: 10.11.0
Relevant Packages:
  next: 16.1.4 // There is a newer version (16.1.6) available, upgrade recommended!
  eslint-config-next: 15.5.4
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
There is a newer version (16.1.6) available, upgrade recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/MrScotch679/NextBunFastRefresh

To Reproduce

Environment

  • Next: 16.1.1
  • Bun: 1.3.8
  • OS: Windows
  • Dev command: bun --bun next dev --turbopack ...
  • Bundler: Turbopack
  • With Node runtime (node ./node_modules/next/dist/bin/next dev --turbopack): no issue
  • With Webpack (bun --bun next dev --webpack): no issue, but slower

Symptom

  • Single file save can trigger many [Fast Refresh] rebuilding / [Fast Refresh] done in … pairs in the browser console.
  • The number of cycles tends to grow over time and sometimes increases after page reload.

Expected: one BUILDING/BUILT pair per save (or at most a couple).

Actual: multiple pairs per save, with the count increasing on larger apps and over time.

Reproduction

Small app (minimal):

  1. Create a minimal Next app.
  2. In package.json set the dev script to bun --bun next dev --turbopack.
  3. Run bun run dev, open / in the browser.
  4. Edit src/app/page.tsx (e.g. add a space) and save.
  5. You may see more than one pair of [Fast Refresh] rebuilding / [Fast Refresh] done for that single save; on very small apps the behavior is not always stable.

Large app (stable repro):

  1. Use an App Router app (many modules/routes, global SCSS entry, next-intl with dynamic message imports, large barrel, layouts importing env and shared exports).
  2. Run bun --bun next dev --turbopack, open any page.
  3. Edit a single file and save.
  4. You should see multiple [Fast Refresh] rebuilding / done pairs (often 5 or more); after several such edits, the number of pairs per save tends to increase further.

Project characteristics

  • Even on small apps with Bun + Turbopack, a single save can produce multiple [Fast Refresh] rebuilding/done pairs.
  • On larger apps, the number of pairs per save increases markedly and can grow over the dev session.

What works / doesn’t

  • Node + Turbopack → OK
  • Bun + Webpack → OK (slower)
  • Bun + Turbopack → multiple BUILDING/BUILT (Fast Refresh) per change; effect worsens with project size.

Current vs. Expected behavior

Expected: one BUILDING/BUILT pair per save (or at most a couple).

Actual: multiple pairs per save, with the count increasing on larger apps and over time.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 65378
  Available CPU cores: 28
Binaries:
  Node: 22.14.0
  npm: 11.5.2
  Yarn: N/A
  pnpm: 10.11.0
Relevant Packages:
  next: 16.1.4 // There is a newer version (16.1.6) available, upgrade recommended!
  eslint-config-next: 15.5.4
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
⚠ There is a newer version (16.1.6) available, upgrade recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Related

Bun: https://github.com/oven-sh/bun/issues/18113

extent analysis

TL;DR

Upgrading to the latest version of Next.js may resolve the issue of multiple Fast Refresh rebuilding/done pairs per save when using Bun with Turbopack.

Guidance

  • Check the version of Next.js and consider upgrading to the latest version (16.1.6) as recommended in the environment information.
  • Verify the issue with the latest canary version of Next.js by running npm install next@canary to confirm if the problem persists.
  • Review the related issue in Bun (https://github.com/oven-sh/bun/issues/18113) for potential insights or workarounds.
  • Test the application with Node + Turbopack or Bun + Webpack to see if the issue is specific to the combination of Bun and Turbopack.

Notes

The issue seems to be related to the combination of Bun and Turbopack, and upgrading Next.js or trying a different bundler might resolve the problem. However, without further information or testing, it's difficult to provide a definitive solution.

Recommendation

Apply workaround: Upgrade to the latest version of Next.js (16.1.6) to potentially resolve the issue, as the current version (16.1.1) may contain a bug that is causing the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING