When I try to add @vercel/og to the project, it compiles, but provides this as an error:
stack:
" [ERR_INVALID_ARG_TYPE]" argument must be of type string. Received undefined at validateString (node-internal:validators:101:15) at join (node-internal:internal_path:1004:13) at .worker-next/.next/standalone/node_modules/next/dist/compiled/@vercel/og/index.node.js (index.js:146973:54) at __init (index.js:12:59) at index.js:147033:52",
name:
"TypeError",
message:
"The "path" argument must be of type string. Received undefined",
I've also tried worker-og and I get:
⨯ ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
Import trace for requested module:
./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin
./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/index.js
./app/api/avatar/[uuid]/route.tsx
⨯ ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
Describe the bug
When I try to add
@vercel/og
to the project, it compiles, but provides this as an error:stack:
" [ERR_INVALID_ARG_TYPE]" argument must be of type string. Received undefined at validateString (node-internal:validators:101:15) at join (node-internal:internal_path:1004:13) at .worker-next/.next/standalone/node_modules/next/dist/compiled/@vercel/og/index.node.js (index.js:146973:54) at __init (index.js:12:59) at index.js:147033:52", name:
"TypeError", message:
"The "path" argument must be of type string. Received undefined",
I've also tried
worker-og
and I get:⨯ ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin Module parse failed: Unexpected character '' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)
Import trace for requested module: ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/index.js ./app/api/avatar/[uuid]/route.tsx ⨯ ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin Module parse failed: Unexpected character '' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)
Even if I try to webAssembly:
I get: Attempted import error: './resvg-LFIOYO65.wasm' does not contain a default export (imported as 'fy').
Steps to reproduce
Expected behavior
I would expect the image to render on the apge.
@opennextjs/cloudflare version
0.2.1
Node.js version
18.x
Wrangler version
3.80
next info output
Additional context
No response