Skip to content Skip to sidebar Skip to footer

Require('react-native').nativemodules Is An Empty Object

In one of the node_modules that I'm using in my project at the top of the file it says: Unfortunately, it appears that require('react-native').NativeModules is an empty object {}.

Solution 1:

You can use this way may be it help you

import {NativeModules} from'react-native';

Solution 2:

I would do this instead

letRNRandomBytes = require('react-native-secure-randombytes')

What you're doing means that it's part of the react-native module, which it is not.

Post a Comment for "Require('react-native').nativemodules Is An Empty Object"