Trying to build openid-client on Cloudflare Workers inside a NuxtJS 3 SSR application but it fails with the following error:
alexander:website$ wrangler dev
🌀 Running NITRO_PRESET=cloudflare yarn nuxt build
yarn run v1.22.17
$ website/node_modules/.bin/nuxt build
Nuxt CLI v3.0.0-27415326.3c563fa 16:54:20: Vite warmed up in 911ms 16:54:21: Client built in 6792ms 16:54:28: Building server...
✔ Server built in 2323ms
ℹ Nitro preset is cloudflare
ℹ Cleaning up .output
start Generating public...
✔ Generated public .output/public
Building server...
ERROR Rollup error: 'randomFillSync' is not exported by node_modules/unenv/runtime/mock/proxy.mjs, imported by node_modules/jose/dist/node/esm/runtime/random.js
ERROR 'randomFillSync' is not exported by node_modules/unenv/runtime/mock/proxy.mjs, imported by node_modules/jose/dist/node/esm/runtime/random.js
Jose natively supports Cloudflare Workers but it seems it requires Jose 5 instead of 4, openid-client requires Jose 4 at the moment.
Building NuxtJS 3 without Cloudflare Workers preset works fine.
Expected behaviour
openid-client works on Cloudflare Workers.
Environment:
openid-client version: 5.1.3
node version: 16.14.0
Additional context
Add any other context about the problem here.
[X] the bug is happening on latest openid-client too.
[X] i have searched the issues tracker on github for similar issues and couldn't find anything related.
Describe the bug
Trying to build openid-client on Cloudflare Workers inside a NuxtJS 3 SSR application but it fails with the following error:
Jose natively supports Cloudflare Workers but it seems it requires Jose 5 instead of 4, openid-client requires Jose 4 at the moment.
Building NuxtJS 3 without Cloudflare Workers preset works fine.
Expected behaviour
openid-client works on Cloudflare Workers.
Environment:
Additional context Add any other context about the problem here.