When building my react native project on my iPhone through XCode, I get the error:
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 10): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
So far I have tried using gesture handler around my App.js elements as said here
I have also tried:
- deleting and re-installing the app on my device
- npm i
- ios pod install
- restarting my computer
- re-opening XCode
I'm also only getting this error in one of my many React-Native apps. This error is quite odd since my app was working perfectly, but when I rebuilt it after disconnecting my iPhone, I started getting this error.
I would really appreciate any advice and feedback on how to fix this issue.
Update: It throws the same error while running on the IOS emulator as well. This is not an issue because of sideloading with a device.