This can happen if you have two versions of react-native installed. I use yarn
to install dependencies, and normally fix this by adding a resolutions
section to my package.json:
{
...
"dependencies": {
...
"react": "16.9.0",
"react-native": "0.61.5",
...
},
...
"resolutions": {
"@types/react": "16.9.0",
"react": "16.9.0",
"react-native": "0.61.5"
},
"devDependencies": {
...
"@types/react": "^16.9.0",
...
},
...
}
Make certain that the versions are consistent — otherwise multiple versions may end up installed by react and some of those versions will not be able to connect to the native dependencies, resulting in an error like JSTimers is not a registered callable module
or Module RCTDeviceEventEmitter is not a registered callable module
.