@react-native-community/netinfo: NativeModule.RNCNetInfo is null... after install

See original GitHub issue

Environment

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.

Screen Shot 2019-04-16 at 7 15 53 PM

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:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

9reactions
reynaldotcommented, Apr 23, 2019
0reactions
matt-oakescommented, Jan 16, 2020

Essentially, if you get this error, you haven’t linked the library correctly. Go back and double check EVERYTHING.

  • Don’t assume that the react-native link command has worked. Go and actually check it using the manual linking instructions.
  • Make sure you run pod install. That’s required event if you’re using autolinking.
  • Do a clean build of the app and restart metro just to be sure.

This is 100% and issue with the way you are installing and updating the library, not an issue with the library itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NativeModule.RNCNetInfo is null · Issue #63 - GitHub
I installed the most recent version (2.0.3) and went back and installed 2.0.2 ( npm install --save @react-native-community/netinfo@2.0.2 ) ...
Read more >
react-native-community/netinfo: NativeModule.RNCNetInfo is ...
1. After successful updated it throws error in react native info, so i installed @react-native-community/netinfo and removed Netinfo from react- ...
Read more >
@react-native-community/netinfo - npm
May not be present, null , or an empty string if it cannot be determined. On iOS, make sure your app meets at...
Read more >
EAS build does not install dependencies defined in other ...
E/ReactNativeJS: Error: @react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: • Run `react-native ...
Read more >
react-native-community/netinfo/README.md - UNPKG
Right click on the Libraries folder and select `Add files to "yourProjectName"`. 95. 96, 3. Add `RNCNetInfo.xcodeproj` (located ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found