-
-
Notifications
You must be signed in to change notification settings - Fork 955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGestureHandlerModule' could not be found. #2749
Comments
I had the same problem cd ios solved the problem for me |
@IvanRuch what is your RN version? if it's 0.72.3 it will work for me but not 0.73.2 |
unable to show the private repo as it's quite huge |
the complete error is |
hi, I have provided the minimal repo at https://github.com/LayMui/ahuaAppTesting please take a look |
could this be due to this PR not merged? #2724 |
I'm having the same issue here *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGestureHandlerModule' could not be found. Verify that a module by this name is registered in the native binary.', reason: 'Unhandled JS Exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGestureHandlerModule' could not be found. Verify that a module by this name is registere..., stack: |
I'm having the same issue here. It happed after i installed @react-navigation/drawer, cmd: "npm install @react-navigation/drawer", my react native version is 0.73 |
I had the same issue when running my tests. This solution (link) from React Navigation docs helped me to resolve it. setup-jest.js
jest.config.js
|
i have a very similar issue too 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: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","SourceCode","Timing","AppState","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","Networking","Appearance","DevLoadingView","HeadlessJsTaskSupport","DeviceInfo","UIManager","DeviceEventManager","RNCSafeAreaContext","NativeAnimatedModule","SoundManager","I18nManager","StatusBarManager","StatusBarManager","ImageLoader"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","FrameRateLogger","KeyboardObserver","RNGestureHandlerModule"]}, js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:
I am using expo development Build; i have rebuilt the app so many times, cleared my cache, and nothing works im using a windows PC. Please, has anyone faced this issue and gotten a fix?, i've been trying to debug this thig for a week now, and i'm seriously getting tired of React Native at this point, more of debugging than actual productivity. |
I am having the same issue too. Tried to use react native gesture handler version < 2.15.0 and still didn't work. I have ran |
This comment was marked as outdated.
This comment was marked as outdated.
Thank you, just did that and the error went away |
very happy to hear that👌 |
mikey18 what version of react-native-gesture-handler are you using? 2.13.4 this is an issue of react-native-gesture-handler with jest rather than the latest RN version, right? |
Hey LayMui, I'm not sure if the issue is rather with Jest or the RN version itself, but I was using react-native-gesture-handler 2.15.0, which was causing the error, then I downgraded to react-native-gesture-handler 2.14.0, and it stopped showing the error, and I'm using the latest RN. |
it still fail
|
here is my package.json "dependencies": { |
try using 'npx expo-doctor' to see what is causing the conflicts |
my project don't use expo. |
my file is test-setup.js
here is the jest.config.ts but still the same error at Object.require (src/tests/BottomSheet.test.js:2:1) PASS react-native-app apps/react-native-app/src/app/App.spec.tsx (23.393 s) Summary of all failing tests
|
I use plus add the import 'react-native-gesture-handler/jestSetup'; to test.setup.ts
|
@mikey18 have you resolve this error?
please guide me to be resolve this? |
The only way I am able to reproduce this issue is without properly configuring jest mocks. Can you prepare a minimal reproduction with gesture handler mocks configured where this problem occurs? |
This issue appears in RN 0.73.x with the new fabric architecture changes |
my framework is using nx.let me try to setup one mini repo for that... |
Hello @LayMui, Have you fixed this problem? Im using Nx too, and Im finding the solution for this one :( |
yes. my colleague has fixed it
to
to the file jest.config.ts |
Thanks @LayMui, but my issue is when the app running on the device, and I haven't run unit test yet |
installing
use |
import 'react-native-gesture-handler/jestSetup'; By adding above line solved issue for me |
also facing the same issue, can someone help me? |
Description
<GestureHandlerRootView cause error when running unit test with jest
Steps to reproduce
yarn to install all dependencies
run
yarn test -u
throw out these error
FAIL my-design-system-react-native libs/ahua-design-system-react-native/src/tests/BottomSheet.test.js
● Test suite failed to run
this was ok with RN 0.72.3 and
"react-native-gesture-handler": "^2.9.0",
Snack or a link to a repository
https://github.com/LayMui/ahuaAppTesting
Gesture Handler version
2.15.0
React Native version
0.73.2
Platforms
MacOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
None
Device model
NA
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: