I am trying to run a react-native project of someone else’s in my android simulator. after installing all the dependencies and copy and pasting the src folder I’m getting this error and I’ve no idea what to do as i’ve been trying to solve this for 2 days.
`
ERROR Error: Failed to initialize react-native-reanimated library, make sure you followed installation steps here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details)
2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache, js engine: hermes
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
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
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
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`
I tried soo many solutions like cd ./android && ./gradlew clean.. etc but no command is useful.
5
Answers
I had this message and apparently, there is an error in your code, it just doesn’t know what’s wrong.
What I did is run my project using
expo start -c
to clear the cache and then the real error was been printed on my terminal.Hope I could help you!
It happened In Expo Project due to the ‘react-native-reanimated’ Library
Here is the Installation for ‘react-native-reanimated’
https://docs.expo.dev/versions/latest/sdk/reanimated/
Before Installation run expo start -c to Clear Cache
I had this issue
And this works for me
It can happen if you have some code that requires native functionality (in my case I was implementing Apple Sign-In and had a need for @react-native-firebase/auth) which requires the app to be installed with expo run:ios (or android) on the simulator (or through XCode). So, just run the above command or comment out that code if the error’s root is something similar to what I mentioned.
I hope it will be helpful to someone!
I tried to change variable names like dbName dbVersion and got same error,
then I realized that I was using same path inside more than one class but was updating only one, after updating them all error gone.