🐛 BUG: Importing @google-cloud/storage fails with Uncaught TypeError: (init_inherits(...) , __toCommonJS(...)) is not a function with nodejs_compat_v2 #6676
Including @google-cloud/storage fails with the latest node compat.
wrangler dev:
Uncaught TypeError: (init_inherits(...) , __toCommonJS(...)) is not a function
at null.<anonymous> (index.js:28993:54) in
../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js
Which Cloudflare product(s) does this pertain to?
Wrangler
What version(s) of the tool(s) are you using?
3.76.0 [Wrangler]
What version of Node are you using?
22.6.0
What operating system and version are you using?
MacOS Sonoma 14.4.1
Describe the Bug
Observed behavior
Including
@google-cloud/storage
fails with the latest node compat.wrangler dev:
Expected behavior
Importing should work.
Steps to reproduce
Import
@google-cloud/storage
.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response