vercel/og missing .wasm files
When using the vercel/og pages plugin I get this error:
In the docs I saw no mention of having to do anything else other than installing the plugin. Am I missing something by chance?
✘ [ERROR] 2 error(s) and 0 warning(s) when compiling Worker.
20:36:18.056
20:36:18.056
20:36:18.059
20:36:18.061 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.061
20:36:18.062 ../node_modules/@vercel/og/dist/index.edge.js:9:23:
20:36:18.062 9 │ import resvg_wasm from "./resvg.wasm?module";
20:36:18.062 ╵ ~~~~~~~~~~~~~~~~~~~~~
20:36:18.062
20:36:18.062 This error came from the "onResolve" callback registered here:
20:36:18.063
20:36:18.063 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.063 124157 │ build5.onResolve(
20:36:18.063 ╵ ~~~~~~~~~
20:36:18.063
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:20
20:36:18.063 at Array.forEach (<anonymous>)
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124156:22
20:36:18.064 at Array.forEach (<anonymous>)
20:36:18.064 at setup (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124153:16)
20:36:18.064 at handlePlugins (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:1276:21)
20:36:18.064 at buildOrServeImpl (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:965:5)
20:36:18.064 at Object.buildOrServe (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:773:5)
20:36:18.064 at /opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:2112:17
20:36:18.064
20:36:18.064
20:36:18.064 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
20:36:18.065
20:36:18.065 ../node_modules/@vercel/og/dist/index.edge.js:10:22:
20:36:18.065 10 │ import yoga_wasm from "./yoga.wasm?module";
20:36:18.065 ╵ ~~~~~~~~~~~~~~~~~~~~
20:36:18.065
20:36:18.065 This error came from the "onResolve" callback registered here:
20:36:18.065
20:36:18.065 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.066 124157 │ build5.onResolve(
20:36:18.066 ╵ ~~~~~~~~~
20:36:18.067
20:36:18.067
20:36:18.067 ✘ [ERROR] Build failed with 2 errors:
20:36:18.067
20:36:18.067 ../node_modules/@vercel/og/dist/index.edge.js:9:23: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.068 ../node_modules/@vercel/og/dist/index.edge.js:10:22: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
✘ [ERROR] 2 error(s) and 0 warning(s) when compiling Worker.
20:36:18.056
20:36:18.056
20:36:18.059
20:36:18.061 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.061
20:36:18.062 ../node_modules/@vercel/og/dist/index.edge.js:9:23:
20:36:18.062 9 │ import resvg_wasm from "./resvg.wasm?module";
20:36:18.062 ╵ ~~~~~~~~~~~~~~~~~~~~~
20:36:18.062
20:36:18.062 This error came from the "onResolve" callback registered here:
20:36:18.063
20:36:18.063 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.063 124157 │ build5.onResolve(
20:36:18.063 ╵ ~~~~~~~~~
20:36:18.063
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:20
20:36:18.063 at Array.forEach (<anonymous>)
20:36:18.063 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124156:22
20:36:18.064 at Array.forEach (<anonymous>)
20:36:18.064 at setup (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124153:16)
20:36:18.064 at handlePlugins (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:1276:21)
20:36:18.064 at buildOrServeImpl (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:965:5)
20:36:18.064 at Object.buildOrServe (/opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:773:5)
20:36:18.064 at /opt/pages/build_tool/js/node_modules/wrangler/node_modules/esbuild/lib/main.js:2112:17
20:36:18.064
20:36:18.064
20:36:18.064 ✘ [ERROR] [plugin wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
20:36:18.065
20:36:18.065 ../node_modules/@vercel/og/dist/index.edge.js:10:22:
20:36:18.065 10 │ import yoga_wasm from "./yoga.wasm?module";
20:36:18.065 ╵ ~~~~~~~~~~~~~~~~~~~~
20:36:18.065
20:36:18.065 This error came from the "onResolve" callback registered here:
20:36:18.065
20:36:18.065 ../../../pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:124157:19:
20:36:18.066 124157 │ build5.onResolve(
20:36:18.066 ╵ ~~~~~~~~~
20:36:18.067
20:36:18.067
20:36:18.067 ✘ [ERROR] Build failed with 2 errors:
20:36:18.067
20:36:18.067 ../node_modules/@vercel/og/dist/index.edge.js:9:23: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/resvg.wasm?module'
20:36:18.068 ../node_modules/@vercel/og/dist/index.edge.js:10:22: ERROR: [plugin: wrangler-module-collector] ENOENT: no such file or directory, open '/opt/buildhome/repo/node_modules/@vercel/og/dist/yoga.wasm?module'
4 Replies
I'm running into this problem too. Did you ever find a solution?
I'm on the same boat.
I'm using pnpm
Found these issues
https://github.com/cloudflare/pages-plugins/issues/30
I got error using
ImageResponse
from @cloudflare/pages-plugin-vercel-og/api
or @vercel/og
, and using vercelOGPagesPlugin
w/ no error.GitHub
No Loader is Configured for
.wasm
Files · Issue #30 · cloudflare/...When installing the new @cloudflare/pages-plugin-vercel-og plugin, as soon as it is installed with a function created (I used the sample code used in the docs) it fails to build the worker, both lo...
Any update on this? I'm running into the same issue as well