Expo
How do I fix "Cannot find native module" in an Expo app?
Your app's JavaScript is asking for native code that isn't in the app you're running. Run npx expo install --fix so every package matches your Expo SDK, then make a new development build or store build that includes the package.
Updated October 31, 2026
If your app opens to a red screen that says Error: Cannot find native module 'ExpoLinking' (or 'ExponentImagePicker', or 'ExpoAsset'), it looks like the package is missing, but it’s installed. What’s missing is its native half, the compiled iOS and Android code inside the app on your phone. You can fix that without changing your own code.
Why it happens
Many Expo packages come in two parts: JavaScript that lives in your project, and native code that gets compiled into the app you install. When the JavaScript loads, it looks up its native module by name, and if the app on the phone doesn’t contain it, you get this error. The name in quotes tells you which package to look at, so ExpoLinking is expo-linking, ExponentImagePicker is expo-image-picker, and ExpoAsset is expo-asset.
Check your setup against these four ways the gap can open:
- You’re testing in Expo Go, which only has a fixed set of native libraries built in, and this package isn’t one of them.
- A package version doesn’t match your Expo SDK, for example after
npm install some-package@latest, so its JavaScript asks for native code your build doesn’t have. - You added the package after making your development build, so the build on your phone predates it.
- An over-the-air update shipped JavaScript that needs native code the store build doesn’t include.
The iPhone error Invariant Violation: new NativeEventEmitter() requires a non-null argument is the same problem in different words. It means a native module that isn’t in the build was passed to React Native’s event emitter as null, and that null check only runs on iOS, which is why Android users of the same app may never see it.
How to fix it
-
Match every package to your Expo SDK:
npx expo install --fixFrom here on, add Expo and React Native packages with
npx expo installrather thannpm install, so the version is picked for your SDK. -
Run Expo Doctor to catch other dependency and config problems:
npx expo-doctor -
Move off Expo Go if the library isn’t in it. A development build is your own version of Expo Go with your libraries compiled in:
npx expo install expo-dev-client eas build --profile development --platform ios -
Rebuild after any native change. Installing or updating a library with native code, changing your app config, and upgrading your SDK all need a new build, because the native code in an installed app can’t change.
-
For a store build that broke after an update, ship a new build that includes the package. To keep it from happening again, we’d set
"runtimeVersion": { "policy": "fingerprint" }inapp.json, so the runtime version changes whenever native code changes and updates only reach builds that can run them.
How you know it’s fixed
The app gets past the red screen on both platforms, and the feature that uses the package works, such as opening a link or picking a photo. npx expo-doctor finishes without version warnings.
If it still shows up
Restart the bundler with npx expo start --clear, so it isn’t serving old JavaScript. Then check that the app you’re opening is the new build, not an older copy still on the phone. If the package isn’t an Expo package, check its README for a config plugin to add to app.json, since that setup only takes effect in a new build.
Ask the agent
If your app is in Draftbit, paste this into the agent, and it can read your code and make the change for you.
My app shows Cannot find native module 'ExpoLinking' when it opens. Run npx expo install --fix and expo-doctor, fix any package versions that don't match our Expo SDK, and tell me whether I need a new development build or store build.