-
Notifications
You must be signed in to change notification settings - Fork 14
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
Nextjs 15 support #110
Comments
Bumping now that NextJS 15 is out. |
Facing this issue with Next 15. |
Next changed metadata causing this plugin to no longer work for page router |
You can use this plugin instead as a temporary workaround https://github.com/remorses/next-superjson This package always uses the same version of |
Doesn't work for me. Throws the exact same errors as |
@Andkoo you have to remove the swc plugins section in your next.config.js |
That was exactly the issue, figured it out right after posting the comment. It works now, thanks 🙏 |
This. |
https://github.com/remorses/next-superjson throws error
|
App router already supports passing Dates and other non JSON values to client components, you don’t need this plugin |
Thanks, good to know! I seem to have issues with the native serializer/deserializer of Next.js though which I didn't experience when using Edit:) those links above are worthless, nobody pursued the issue. I created a discussion here vercel/next.js#75976 |
Is this true for custom types like Decimal used by prisma? This is the main reason why we need superjson at the moment. I guess it's only supporting the types listed at https://react.dev/reference/rsc/use-server#serializable-parameters-and-return-values |
Please stop using decimals in postgres & prisma, use Float instead with 24 precision. |
Any update on this? |
Some of us probably will be stuck with the pages router forever. Didn't understand this being ported there. |
I'll close this since, as mentioned a couple times already, the app router already supports non-json values, making this plugin obsolete. |
So people using the pages router have to write their own or should it work for static/server side props out of the box too? |
You can use this library instead which works with Next 15 https://github.com/remorses/next-superjson |
Please reopen this! Until Next.js fully deprecates and removes the Pages Router, it is a core part of the framework. Therefore, this plugin is not obsolete. Quite the opposite, it is of great value to Pages Router projects. 🙇🏻 |
@remorses unfortunately, your library is not an effective drop-in replacement for this plugin (while keeping it as a runtime dependency). I tried it on a large codebase back in November and it appeared to interfere with project config, with numerous routes malfunctioning. Besides that, and I sincerely mean no offense by this, its existence shouldn't be necessary. |
While this is true for most common types like Dates this is not true for any custom js types out there (e.g. Prisma Decimals which we heavily rely on). For me the use case of superjson combined with this plugin has always been to address exactly this - serializing any custom/niche types. That's why I'm very surprised about this decision. |
I am not sure if this is true. For one, this plugin is still needed and its |
Verify Next.js canary release
Describe the bug
When running the build, I get the following issue. I guess swc_core has to be updated. Is this planned?
Expected behavior
No build error
Reproduction link
No response
Version
0.6.3
Config
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: