You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this is the correct place to report this issue.
When using Next.js and Drizzle with Neon, I encountered the following error:
Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes ornull prototypes are not supported.
Steps to Reproduce
Using Next.js with Drizzle ORM and the Neon Database, call a server-side function like the following to delete a record:
Looks like this is more of a question about drizzle-orm and Next.js than the serverless driver. I'm not an expert in either of those, but if the problem simply arises from trying to pass functions between client and server, wouldn't one of these solve it?
Thanks for the suggestions! These would likely solve the serialization issue, but I’d prefer to handle any potential errors that might be returned. Both examples you provided ignore errors. I will present this issue to the Drizzle team.
I hope this is the correct place to report this issue.
When using Next.js and Drizzle with Neon, I encountered the following error:
Steps to Reproduce
Using Next.js with Drizzle ORM and the Neon Database, call a server-side function like the following to delete a record:
In the response, the
_types
object contains the functionsgetTypeParser
andsetTypeParser
, and I wonder if that is the issue.Neon and drizzle setup:
Temporary Workaround
Adding
.returning()
to the query resolves the issue, but this should not be necessary for the operation to work:This workaround returns a different structure that does not include the problematic functions.
Environment
Additional Information:
It seems that the issue may also arise in cases involving a
NeonDbError
, but I don't have clear steps to reproduce that specific case.The text was updated successfully, but these errors were encountered: