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:
If you don't need the result of that query, you shouldn't add a return statement to your function. That way, the return type is void and the query an execute without issues.
If you do need the result, you can remove the _types key in the object and that should solve it.
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.38.3
What version of
drizzle-kit
are you using?0.30.1
Other packages
@neondatabase/[email protected], [email protected], [email protected]
Describe the Bug
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: