Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
next/dynamic not hydrating content and rendering twice on pages dir | GoodFirstPicks

next/dynamic not hydrating content and rendering twice on pages dir

vercel/next.js 2 comments 1mo ago
View on GitHub
highopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

Issue involves complex interaction between Turbopack and next/dynamic with unclear root cause.

AI Summary

The issue involves next/dynamic not hydrating content correctly and rendering twice when using Turbopack in the Pages Router. The problem appears to be specific to Turbopack's handling of dynamic imports, but the root cause is unclear. This requires deep knowledge of both Turbopack and Next.js's hydration mechanisms.

Issue Description

Link to the code that reproduces this issue

https://github.com/kristiancoulsonplt/next-dynamic-bug

To Reproduce

  1. Clone the repo
  2. npm i
  3. run npm run dev:turbo and you should see it on the index page

Manual Rep to recreate the issue

  1. Create a new next app using pages router
  2. Create a component that is imported into _app using dynamic import
  3. Run next dev server using turbo pack

Current vs. Expected behavior

Without using turbopack it only renders once and hydrates properly

Image

Using turbopack it renders once with SSR, then renders a second time - worth noting the first render is not interactive at all

Image

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Fri Nov 15 15:13:15 PST 2024; root:xnu-10063.141.1.702.7~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 8
Binaries:
  Node: 20.19.0
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 15.2.4 // Latest available version is detected (15.2.4).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.2
Next.js Config:
  output: N/A

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

Lazy Loading

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

next dev (local)

Additional context

The closest issue I can find is this comment but the thread was auto closed due to inactivity https://github.com/vercel/next.js/issues/70795#issuecomment-2557216910

GitHub Labels

Lazy LoadingTurbopack

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 35 points when you complete it!

Risk Flags

  • Turbopack integration
  • hydration mismatch
  • cross-cutting changes
Loading labels...

Details

Points35 pts
Difficultyhigh
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno