Web3Modal does not work with Create-React-App 5 (CRA) apps
Currently, the quickest way to fix this is to downgrade to use react-scripts 4.0.3: https://github.com/WalletConnect/walletconnect-monorepo/issues/748#issuecomment-1068664216
The other ways include ejecting your CRA app, but that includes its own set of challenges which prevent the Web3Modal from working correctly. For example, you'll most likely run into this "Buffer is not defined" error even if you get webpack.config.js to work correctly: https://github.com/WalletConnect/walletconnect-monorepo/issues/748#issue-1125180323
Web3Modal needs to work with CRA5 without ejecting the React app.
yes,i meet same issues too
same here, does anyone knows if it's possible to fix it? could i help in some way?
Same. Would be great if this could be fixed!
Here is a fix that works with the latest react, but it messes up the vscode linter.
https://ethereum.stackexchange.com/questions/123530/module-not-found-error-cant-resolve-stream-in-react-project-including-web3
Hopefully some of the upstream code gets cleaned up soon.
Here's a video I made that walks you through how to handle these types of issues: https://www.youtube.com/watch?v=lGh_feKJzbk
With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)
If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.