importpandasaspd
importpandasaspd16mo ago

Unhandled Runtime ErrorError: Convex functions should not be imported in the browser.

Hey friend. Got this problem. Really weird actually. I've been scanning through docs and yet can't come up with a solution. Can anyone give me a hint? Is it my fault or a bug?
No description
3 Replies
ian
ian16mo ago
Does this help? https://discord.com/channels/1019350475847499849/1153340882695753778 Hint is that some browser code seems to be importing convex/documents.ts Any code shared between the browser and server shouldn’t expose server-side functions.
importpandasaspd
importpandasaspdOP16mo ago
@ian thanks a lot. Yeah I've been importing code from '@convex/documents' but until a week ago it did not cause problem import { updateDoc } from '@/convex/documents' xd
ian
ian15mo ago
Yeah specifically importing the functions is the issue. glad it's resolved

Did you find this page helpful?