[react-native] Unable to resolve module crypto

When asking for help in this category, please make sure to provide the following details:

  • SDK Version: xcode: 15.3, android: 34
  • Platform: iOS, Android

While setting up the initial environment in bare-react-native, I encountered an issue related to the Bundler Polyfill. The error shown in the screenshot occurred, and even though I followed the troubleshooting documentation exactly, the issue remains unresolved.

https://web3auth.io/docs/troubleshooting/metro-issues-mpc

I am sharing the source code as per the procedure below. I would appreciate it if you could check it and help resolve the issue.

https://github.com/c2e-charlie/c2e-wallet-app/commit/063f57c45c132f23bba3cb9148e8937ab90288dd

Hey @gimtaegyun5 welcome onboard, thanks for sharing information and github repo. We’ll have a look and update you.

Hey @gimtaegyun5,
I understand you’ve been facing issues with polyfilling. But I would like the inform you that the guide that you’ve been using is for our MPC SDK when used with react native. This is the guide that you should be using, I have mentioned here.
Please let me know if this is resolved for you.

Thank you for your prompt response. @maharshi
I checked the link you shared and found the missing code, which I applied.
However, the issue is still not resolved.
Here are the screenshots and the GitHub link to the updated source code.


@maharshi @Ayush

Are you working on solving this problem by any chance?

Hey @gimtaegyun5,
I cloned the repo you mentioned. I see a dependency conflict while installing. Is it the same for you?
I can go ahead and force install it, but can you confirm that it’s the same for you?

Thx for reply. @maharshi

are you talking about that error you get when running npm install? If so, I figured it was related to the react-native-clipboard library and didn’t think it was important. Plus, I used yarn to install it, so I didn’t have any issues.