Open forge-phap-dinh opened 2 years ago
I got the same problem.
yarn add react-native-crypto
# install peer deps
yarn add react-native-randombytes
npx react-native link react-native-randombytes
# on RN >= 0.60, instead do:
cd iOS && pod install
# install latest rn-nodeify
yarn add rn-nodeify
# install node core shims and recursively hack package.json files
# in ./node_modules to add/update the "browser"/"react-native" field with relevant mappings
npx rn-nodeify --install buffer,crypto,stream,util,process,vm --hack
Maybe I've got the answer. You can follow these steps to work it out.
I am using react native 0.66 and after I import the shim file and run the app I get this error
error: Error: Unable to resolve module process ...
process could not be found within the project or in these directories: node_modules
If you are sure the module exists, try these steps: