-
Notifications
You must be signed in to change notification settings - Fork 88
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
Ambiguous class : provide a unique identifier #208
Comments
Hi @LaCocoRoco! Yes, this warning happens because |
Hi @Skn0tt, here is a sandbox to reproduce the problem.
Probably fast refresh from the nextjs framework is the origin of this issue, |
I'm seeing it, thank you! Yeah, that looks like it's occuring during Hot Module Replacement (HMR). That means there already was a class called The warning was originally supposed to warn about existing classes being overwritten, e.g. when something in the build process fails and e.g. some client stub is placed in the server bundle. It's not supposed to trigger during HMR, but apparently it does, and I don't see a good way of excluding HMR here 🤔 Maybe we should disable the warning altogether. What do you think? |
Depends if there are any significant negative effects which could happen if you run in a real ambiguous class situation. But if it is a simple information for "you unnecessary load the class more then once" in my personally opinion you probably could disable it. |
Removed the warning in https://github.com/blitz-js/superjson/releases/tag/v1.12.0. |
Issues Reference: #105 #106 #107 #116 #118
Code Reference: superjson/blob/main/src/registry
This warning only happens in none production environment.
In my use case by using next-superjson-plugin package with a custom class register in nextjs app.ts.
Can someone explain why this warning exits or better how i can fix it in development?
If i'm not wrong this happens because the registerClass gets executed more then once?
I could not find any flag or possibility to suppress this warning.
The text was updated successfully, but these errors were encountered: