Require("crypto") Issue, react native

Hello everyone

am facing the issue of require(“crypto”). while am try to install npm @walletconnect/client. Each time am facing this issue
Please check the screenshort

Screenshot 2022-06-03 at 6.36.03 PM

where are you trying to install walletconnect? how are you trying to install it?

what specific environment is used?

am working on react native and am using this video as guide

this is my package.json

    "@eva-design/eva": "^2.1.1",
    "@react-native-async-storage/async-storage": "^1.17.6",
    "@ui-kitten/components": "^5.1.2",
    "@walletconnect/client": "^1.7.8",
    "events": "^3.3.0",
    "keyvaluestorage": "^0.7.1",
    "moralis": "^1.8.0",
    "react": "17.0.2",
    "react-moralis": "^1.4.0",
    "react-native": "0.66.0",
    "react-native-qrcode-svg": "^6.1.2",
    "use-deep-compare-effect": "^1.8.1"

At what stage of the video is require("crypto") or installing @walletconnect/client used?

they install @walletconnect/client
but they don’t face crypto issue

Can you please suggest me. How i will resolve this issue

Can you try the steps as mentioned in the error screenshot e.g. remove node_modules and yarn install.

am install yarn and run the build but am gettting same issue
Screenshot 2022-06-08 at 10.04.43 AM

At what part of the video (timestamp) do they install @walletconnect/client? Maybe there is something else you have to do.

Also try following the instructions here from WalletConnect for React-Native.

Am creating the new project. Please check the given link. Am follow all the instruction as per the walletConnect.
Link: Download Project here

Versions:
yarn: 1.22.19
node: 4.2.1
react: 17.0.2
react-native: 0.66.0

Please guide me if am doing some wrong.

This is a version specific to react native?

Sorry node version is 16.14.2

please Check the Project in given link

Did you try with other versions of node like 14?

No, because 16.14.2 is stable version of node so am not try it to any another version

Can you share your project on GitHub instead please.

Please check GitHub link here

Thanks. Looking at your package.json, it seems you have not run the rn-nodeify --install --hack command as mentioned in the documentation I linked. Can you do this and try it again.

npx rn-nodeify --install --hack

1 Like

Thanks crypto issue resolved. its working in andriod
But now am facing “144 duplicate symbols for architecture x86_64” error in iOS.

Please check the the repo am updated the code. Link

Can you please look at these topics regarding this issue. I am not familiar with iOS errors/development.

ios - Duplicate symbols for architecture x86_64 under Xcode - Stack Overflow

ios - Duplicate symbols for architecture x86_64 under Xcode - Stack Overflow

Thanks for giving your valuable time. :grinning: