Cannot use WASM in a Pages Function using @cloudflare/pages-plugin-vercel-og

I'm running into an interesting error where when building the function (using either dev or deploy), where on the build I get this error from Wrangler:
✘ [ERROR] ENOENT: no such file or directory, open '/Users/neeron/Documents/Coding/project/node_modules/.pnpm/@[email protected]/node_modules/@vercel/og/dist/resvg.wasm?module' [plugin wrangler-module-collector]
✘ [ERROR] ENOENT: no such file or directory, open '/Users/neeron/Documents/Coding/project/node_modules/.pnpm/@[email protected]/node_modules/@vercel/og/dist/resvg.wasm?module' [plugin wrangler-module-collector]
I really don't understand what's going on here, because the file exists, except for the ?module bit (no idea where that's coming from). A second similar error occurs in the same path except for yoga.wasm. I'm not too familiar with using WASM here, and I don't have a Wrangler.toml file because so far I haven't needed one, but I've just being incorporating this tutorial into my existing app. My imports aren't anything special, just straight from the tutorial, but I'm pretty sure this is Wrangler throwing the error anyway. Thanks for your help!
vercel/og · Cloudflare Pages docs
The @vercel/og Pages Plugin is a middleware which renders social images for webpages. It also includes an API to create arbitrary images.
1 Reply
noreen attahb
noreen attahbOP11mo ago
probably belongs in #pages-help , https://discord.com/channels/595317990191398933/1145066203233128479/1145066203233128479 Don't know how to close the post though
Want results from more Discord servers?
Add your server