walletconnect-utils icon indicating copy to clipboard operation
walletconnect-utils copied to clipboard

Incorrect export causes `ReferenceError: indexedDB is not defined` in nextjs and any bundler that resolves `module` for ES modules

Open michalkvasnicak opened this issue 8 months ago • 1 comments

This export https://github.com/WalletConnect/walletconnect-utils/blob/ffa228c873b2288bbe02e21590ed67f4c0c2a1ab/misc/keyvaluestorage/package.json#L20 causes server side build of nodejs to throw an unhandled error ReferenceError: indexedDB is not defined because module points to browser only javascript file, but module is perfectly valid for nodejs as well.

Browser should probably use only browser export and main + module should target nodejs

michalkvasnicak avatar Jun 09 '25 12:06 michalkvasnicak

It would be really great for this to be addressed as it spams our Sentry subscription with errors we cannot fix.

frontendphil avatar Sep 25 '25 07:09 frontendphil

bumping this, would really be nice to have this fixed

dievardump avatar Nov 14 '25 13:11 dievardump