You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building an app that has frontend part, and backend inside a page worker. When I'm adding stripe as dependency I'm getting this error from running wrangler pages dev ./dist
Uncaught Error: Dynamic require of "util" is not supported
What's interesting — the error does not appear in standard worker, only in cf pages _worker.js
Please provide any relevant error logs
service core:user:app: Uncaught Error: Dynamic require of "util" is not supported
at null.<anonymous> (bundledWorker-0.720856741514531.js:21:9)
at null.<anonymous> (bundledWorker-0.720856741514531.js:24141:17) in
../../node_modules/.pnpm/[email protected]/node_modules/combined-stream/lib/combined_stream.js
at null. (bundledWorker-0.720856741514531.js:3220:50) in __require2
at null. (bundledWorker-0.720856741514531.js:33164:26) in
../../node_modules/.pnpm/[email protected]/node_modules/form-data/lib/form_data.js
at null. (bundledWorker-0.720856741514531.js:3220:50) in __require2
at null. (bundledWorker-0.720856741514531.js:58175:32)
The text was updated successfully, but these errors were encountered:
brachkow
changed the title
🐛 BUG:
🐛 BUG: Dynamic require of "util" is not supported
Jan 6, 2025
brachkow
changed the title
🐛 BUG: Dynamic require of "util" is not supported
🐛 BUG: Dynamic require of "util" is not supported in pages _worker.js
Jan 6, 2025
Which Cloudflare product(s) does this pertain to?
Pages, Workers Runtime, Wrangler
What versions are you using?
wrangler 3.99.0, node v22.12.0
What operating system and version are you using?
Mac 15.0.1
Please provide a link to a minimal reproduction
No response
Describe the Bug
I'm building an app that has frontend part, and backend inside a page worker. When I'm adding stripe as dependency I'm getting this error from running
wrangler pages dev ./dist
I build worker using this esbuild config:
My wrangler config has such compat configuration
What's interesting — the error does not appear in standard worker, only in cf pages _worker.js
Please provide any relevant error logs
service core:user:app: Uncaught Error: Dynamic require of "util" is not supported
../../node_modules/.pnpm/[email protected]/node_modules/combined-stream/lib/combined_stream.js
at null. (bundledWorker-0.720856741514531.js:3220:50) in __require2
at null. (bundledWorker-0.720856741514531.js:33164:26) in
../../node_modules/.pnpm/[email protected]/node_modules/form-data/lib/form_data.js
at null. (bundledWorker-0.720856741514531.js:3220:50) in __require2
at null. (bundledWorker-0.720856741514531.js:58175:32)
The text was updated successfully, but these errors were encountered: