react-native: `Invariant Violation: Native module cannot be null` error info does not show the precise stack of which module is null
i got this error: Invariant Violation: Native module cannot be null
, and i want to know which native module is null so i can come to handle it, but the error stack message dose not show any useful message for me to investigate it
Invariant Violation: Native module cannot be null.
reportException @ ExceptionsManager.js:44
handleException @ ExceptionsManager.js:113
handleError @ setUpErrorHandling.js:23
reportFatalError @ error-guard.js:49
guardedLoadModule @ require.js:204
metroRequire @ require.js:128
(anonymous) @ deprecatedTypes.ts:40
executeApplicationScript @ RNDebuggerWorker.js:2
(anonymous) @ RNDebuggerWorker.js:2
React Native version:
System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.99 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.3.1 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.13.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 21, 23, 26, 27, 28
Build Tools: 23.0.1, 26.0.1, 28.0.3, 29.0.2
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.2/11B52 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.4 => 0.61.4
Steps To Reproduce
[skip reproduce step]
Describe what you expected to happen:
the error log of Invariant Violation: Native module cannot be null.
show the exact stack message of the null
module
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 16
- Comments: 31
Facing the same problem too 😦 Does anyone got solution for this?
I am facing the same issue after adding react-native-dialogflow to my app, I have reinstalled it, but still facing the same error. I really don;t understand how so many people are facing this issue and noone is able to resolve it for them.
I have the same exact issue as all of you.
i
For expo users, “expo upgrade” should do the job
I had to remove dialogflow, and systematically install different versions of DFlow until i got the latest version of Dflow that was compatible with the version of react-native (using Expo) i am using.
ill have to dig up the exact commands I used. If the above doesnt help i can spend some time to find out exactly what I did.
Hey. I have the same error now.
Package.json