question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Native module cannot be null

See original GitHub issue

Describe the bug I get the the following error when installing and running the app, like described in the guide. As soon as I import Mapbox with import MapboxGL from "@react-native-mapbox-gl/maps"; I get the following message. Any one knows what’s going on?

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Versions (please complete the following information):

  • Platfrom: iOS
  • Device: Simulator 10.2.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pmatiascommented, Jul 22, 2019

I’ve fixed this by running pod install inside the iOS folder. Basically the iOS libraries were missing from the Xcode project.

0reactions
pmatiascommented, Jul 23, 2019

@WrathChaos Try running react-native link @react-native-mapbox-gl/maps in your project root and then pod install in the iOS dir again. The problem for me was that the Xcode project didn’t have the maps library linked.

This is what gave me the clue https://github.com/react-native-mapbox-gl/maps/blob/master/ios/install.md

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native, "Native module cannot be null" - Stack Overflow
To solve this, your Project Navigator -> Target -> General -> Linked Frameworks and Libraries, make sure somelib.a is there. enter image description...
Read more >
Native Module can not be null in ios #352 - GitHub
After installing the package and using the provider in the App.js i get Native Module can not be null , my package.json looks...
Read more >
native module cannot be null - Expo Snack
native module cannot be null. No description. Open with Expo Go. Open in editor. Need Expo? Don't have the Expo Go? Download the...
Read more >
React-native, “Native module cannot be null” - iTecNote
To solve this, your Project Navigator -> Target -> General -> Linked Frameworks and Libraries, make sure somelib.a is there. enter image description...
Read more >
iOS Native Modules
To get started, open up the iOS project within your React Native application in Xcode. You can find your iOS project here within...
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