web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

Web3Modal does not work with Create-React-App 5 (CRA) apps

Open INFRcheungp opened this issue 3 years ago • 5 comments

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.

INFRcheungp avatar May 17 '22 19:05 INFRcheungp

yes,i meet same issues too

1500256797 avatar May 31 '22 03:05 1500256797

same here, does anyone knows if it's possible to fix it? could i help in some way?

chescalante avatar Jun 08 '22 01:06 chescalante

Same. Would be great if this could be fixed!

rinahorde avatar Jun 19 '22 13:06 rinahorde

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.

mwawrusch avatar Jul 14 '22 19:07 mwawrusch

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

st4rgut24 avatar Sep 21 '22 03:09 st4rgut24

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.

xzilja avatar Jan 21 '23 16:01 xzilja