@react-native-community/netinfo: NativeModule.RNCNetInfo is null... after install
See original GitHub issueEnvironment
React Native Environment Info: System: OS: macOS 10.14.4 CPU: x64 Intel® Core™ i7-7820HQ CPU @ 2.90GHz Memory: 174.83 MB / 16.00 GB Shell: 5.5.1 - /usr/local/bin/zsh Binaries: Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node npm: 6.4.0 - ~/.nvm/versions/node/v8.11.4/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.2/10E125 - /usr/bin/xcodebuild npmPackages: react: 16.5.0 => 16.5.0 react-native: 0.57.1 => 0.57.1
Platforms
Both
Versions
- Android: 8.0.0 && 8.0.1
- iOS: 12.1
- react-native-netinfo: 2.0.2 && 2.0.3
- react-native: 0.57.1
- react: 16.5.0
Description
I installed the latest version as well as 2.0.2, linked the package using react-native link @react-native-community/netinfo, and rebuilt the project using react-native run-ios. I got the previously reported @react-native-community/netinfo: NativeModule.RNCNetInfo is null... error.
As per @matt-oakes 's request, I am not using Cocoa Pods so there isn’t a Podfile or Podlock to report, I am using react-native’s link command for everything.
Reproducible Demo
All I did was install, rebuild the project and restart the packager after importing the package in the root App.js file.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Related StackOverflow Question
Manually linking the library worked for me.
Essentially, if you get this error, you haven’t linked the library correctly. Go back and double check EVERYTHING.
react-native linkcommand has worked. Go and actually check it using the manual linking instructions.pod install. That’s required event if you’re using autolinking.This is 100% and issue with the way you are installing and updating the library, not an issue with the library itself.