react-native-gesture-handler: 'RNGestureHandlerModule' could not be found.
Description
Bridgeless mode is enabled (NOBRIDGE) ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(…): ‘RNGestureHandlerModule’ could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: true. TurboModule interop: true. Modules loaded: {“NativeModules”:[],“TurboModules”:[“PlatformConstants”,“LogBox”,“SourceCode”,“AppState”,“BlobModule”,“WebSocketModule”,“DevSettings”,“DevToolsSettingsManager”,“Networking”,“Appearance”,“DevLoadingView”,“DeviceInfo”,“ImageLoader”,“SoundManager”,“IntentAndroid”,“DeviceEventManager”],“NotFound”:[“NativePerformanceCxx”,“NativePerformanceObserverCxx”,“RedBox”,“BugReporting”,“HeadlessJsTaskSupport”,“LinkingManager”,“ReanimatedModule”,“RNGestureHandlerModule”]} (NOBRIDGE) LOG Running “trendlyne_app” with {“rootTag”:11,“initialProps”:{},“fabric”:true} (NOBRIDGE) ERROR Invariant Violation: “trendlyne_app” has not been registered. This can happen if:
- Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
- A module failed to load due to an error and
AppRegistry.registerComponentwasn’t called.
react-native: 0.74.3
react-native-gesture-handler: "2.18.1",
possible duplicate of - https://github.com/software-mansion/react-native-gesture-handler/issues/2847
I want to know the root cause of this issue, While debugging I found all these modules mentioned are null. What is the thing that is causing these types of issues, Checked so many issues but no one has given the root cause of these issues.
Steps to reproduce
Upgraded the react native version from 0.73 -> 0.74.3 Once I tried to build the app, it crashed as soon as it started.
Snack or a link to a repository
https://snack.expo.dev/?platform=android
Gesture Handler version
2.18.1
React Native version
0.74.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Pixel 6
Acknowledgements
Yes
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (10 by maintainers)
We are also having this issue with latest react native 0.76.4
Seems like the React Native Team have fixed the issue and are working to merge the revert in the linked PR:
https://github.com/facebook/react-native/issues/48173#issuecomment-2527623384
UPDATE: Upgrading to RN 0.76.5 fixed linking issues on Android
I took the liberty of editing your comment to make
package.jsonmore readable, I hope you don’t mind 😅Not really. The only place where we use async storage is in our example app, so it shouldn’t be a problem (you can see that it is not specified in our main
package.json), but…It is specified in your
package.json:So probably you’re using it somewhere in your project.
Import is not required, unless you’re using something from library, like
GestureDetector.It’s hard to say given that we only have RN version and
package.json. I’ll try to look into this file later, maybe I’ll find something. In the meantime, I have one more question:So on 0.73 it worked fine? Just to be sure, is it on new architecture?
@saikiran-photon This issue seems to be platform-independent so it won’t be tracked under 2 separate issues. I’ve added relevant tag in #2847.
Also, it would be great if you could provide a reproduction, it would be much easier to find root cause of this problem.
Closing as duplicate of #2847