dcgtc / dgrants

Decentralized Grant platform that implements quadratic funding.
GNU Affero General Public License v3.0
84 stars 39 forks source link

Walletconnect throwing error #555

Closed metafraction closed 2 years ago

metafraction commented 2 years ago

When connecting with walletconnect, it throws the following error

Screen Shot 2021-12-01 at 2 24 06 PM
metafraction commented 2 years ago

It seems require is in node and not supported client side - although, there are options like require.js or browserify if we want to support it

mds1 commented 2 years ago

This is a vite-specific issue—it's a modern build tool and doesn't use the older require syntax. When packages use require, we basically have to polyfill it with something like this: https://github.com/originjs/vite-plugins/tree/main/packages/vite-plugin-commonjs

See this issue fore more info: https://github.com/vitejs/vite/issues/3409 (not sure why it only happens with WC though)

mds1 commented 2 years ago

Ah this seems more relevant to us: https://github.com/vitejs/vite/issues/4593

metafraction commented 2 years ago

@mds1 ^ ah yeah that does seem more relevant - although, not sure how he resolved the issue