I'm trying to build a mobile application with expo and react-native, I have a screen where I need to generate a passphrase for the user and I'm using react-native-bip39 in order to do that.
After installing the following packages: react-native-bip39, react-native-crypto and react-native-randombytes, I had an error that says:
Unable to resolve module
stream
After doing some digging, I understood that I could use rn-nodeify to install the missing packages, however when I did install it, the following error has been generated and I can't seem to find a solution for it:
TypeError: null is not an object (evaluating 'RNRandomBytes.seed') at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError at node_modules/metro-runtime/src/polyfills/require.js:204:6 in guardedLoadModule at http://192.168.18.160:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:222696:3 in global code
Followed by another one on the terminal:
Invariant Violation: "main" has not been registered. This can happen if: Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project. A module failed to load due to an error and
AppRegistry.registerComponentwasn't called. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
There is a shim.js file generated by rn-nodeify in the root folder, and package.json has more dependencies installed by the same tool.
How can I resolve this issue?