Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

require('react-native').NativeModules.RNRandomBytes is null

$
0
0

In the index.js of the npm library react-native-randombytes there's a line: let RNRandomBytes = require('react-native').NativeModules.RNRandomBytes. In the init() method there's a code block wrapped in an if statement, if (RNRandomBytes.seed) { ... }, and here's where the code is breaking, as RNRandomBytes is undefined.

In debugging, I've found that NativeModules has plenty of libraries associated with it, just not RNRandomBytes. I'm in a Windows 10 environment, using node.js and react-native via rn-nodeify. I've gone through the react-native-crypto steps, including the react-native link step. I'm guessing I'm missing something, is there a way to populate NativeModules with RNRandomBytes?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>