Y-Foundry-Dao / yfd-dapp-core

Governance dApp
GNU Affero General Public License v3.0
2 stars 1 forks source link

WalletConnect and React18 are incompatible #11

Open rayraspberry opened 2 years ago

rayraspberry commented 2 years ago

@WalletConnect combined with React18 throws errors / warnings Error: ENOENT: no such file or directory,

Behavior seems to be addressed here: https://github.com/Uniswap/web3-react/issues/545 and here: https://github.com/WalletConnect/walletconnect-monorepo/issues/748

adding the following to package.json "start": "GENERATE_SOURCEMAP=false react-app-rewired start"

and config-override.js `const webpack = require('webpack'); module.exports = function override(config, env) { config.resolve.fallback = { url: require.resolve('url'), assert: require.resolve('assert'), buffer: require.resolve('buffer'), }; config.plugins.push( new webpack.ProvidePlugin({ process: 'process/browser', Buffer: ['buffer', 'Buffer'], }), );

return config; };`

Have mitigated the issue, but I don't feel as though it's actually resolved.

Errors are gone, but at some point I think there's a need to update WalletConnect or downgrade React to 17

rayraspberry commented 2 years ago

looks like the actual issue is with webpack: https://github.com/facebook/create-react-app/pull/11752

Known issue waiting for a merge to resolve