deenD
Convex Community12mo ago
5 replies
deen

structuredClone ✨

Last week the Vercel AI SDK casually added a structuredClone call to the generateText functionality, causing it to now fail in the Convex runtime as it doesn't seem to be implemented. https://github.com/vercel/ai/commit/00114c5d0c606ea01ca614606e2b6499666e52d1#diff-479910b2e8ffb3ce9d79aca7bd77eb6972087a2137b71b1d098a2528e7fce454R499

Following the advice here ReferenceError: structuredClone is not defined, I added the polyfill for structuredClone and it works! But, it would be cool to not have to do this, or use node. I imagine a lot of people will be hitting this in the coming weeks as our industry is now solely dedicated to building apps with AI
Was this page helpful?