-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration error when using Turbopack with dynamically imported named exports. #70795
Comments
Hi @gurkerl83, I'm here to check in, does it work when using as |
@devjiwonchoi I will try with the latest canary version later today, and keep you updated. |
@devjiwonchoi I tried with the latest canary versions of both next and react. I have updated the reproducer with these versions.
Putting it on
The closest I could find in the set of open PRs, which maybe is related is, but this is just a guess. #71145 Can you please forward this issue to one of the engineers, who are working on the turbopack feature. Thx! |
Hi @gurkerl83 , |
@devjiwonchoi @gurkerl83 I am also getting this hydration error, not sure if this is related to this thread, just created new project using latest nextjs version with turbopack ![]() |
@Susheel4115 @qasimgit I'd recommend opening another issue because these don't look related based on the screenshot. It looks like you just have a generic hydration error caused by e.g. a chrome extension installed in your browser. Please make sure that when posting comments you're not sharing screenshots but instead share the actual code. A great example of a good and useful interaction is @gurkerl83's investigating and providing a reproduction in this issue. |
@timneutkens even though I tried uninstalling concerned extensions it still showing error in the console after the refresh its gone. |
I'd love to help you but I can't help you if you don't share the code that reproduces the issue 🙂 Please open a new issue 🙏 |
I tried to make the description as clear as possible. The hydration error is caused when using these in combination.
Hydration errors can be caused by many reasons, this particular one is only forming when these conditions are met. @Susheel4115 I also guess that you have some kind of extension interfering, other reasons might be a secondary react installation in your node modules, but this might be only the case when you are linking libraries by hand after compiling them. Take a fresh browser installation an see if the error persists. The reproducer I provided shows the hydration error even on refresh. Hope this helps. Thx! |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@Susheel4115 please read my previous messages, further messages on this issue will be hidden as spam as they're irrelevant for the issue @gurkerl83 reported. |
okay @timneutkens |
Hi @timneutkens, It’s been a while! I know there’s a lot happening with Turbopack, but I was wondering if one of the developers might be able to take a look at the issue. I’ve retested this with the latest Canary versions:
Unfortunately, the problem persists. The recent changes related to dynamic/import don’t seem to have resolved it yet. Thanks so much for your help! |
Hi @gurkerl83, Glad to see your message I have cloned the code repo using your provided url and while I try to debug the code I came across this piece of code : loadableOptions = { ...loadableOptions, ...options } const loaderFn = loadableOptions.loader as () => LoaderComponent
I can understand there is a problem with names export that too in turbopack please check the code I have provided if there is any leads please let me I know I found this issue is interesting 👍🏽 |
I'm having the same issue (double rendering) but only when my dynamic component is using the { ssr: true } option. |
The problem is fixed in 15.1.1-canary.14, most likely here d3529ba. Important note: |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/gurkerl83/next-turbo-dynamic-import
To Reproduce
Current vs. Expected behavior
Current Behavior:
Expected Behavior:
Examples:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 Available memory (MB): 65536 Available CPU cores: 16 Binaries: Node: 22.6.0 npm: 10.8.2 Yarn: N/A pnpm: 9.11.0 Relevant Packages: next: 15.0.0-canary.177 // Latest available version is detected (15.0.0-canary.177). react: 19.0.0-rc-0751fac7-20241002 react-dom: 19.0.0-rc-0751fac7-20241002 typescript: 5.6.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Lazy Loading, Pages Router, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The text was updated successfully, but these errors were encountered: