Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find module for EventDispatcher React Native

Tags:

react-native

On starting application using react-native run-ios its showing error on simulator Unable to find module for EventDispatcher

enter image description here

like image 781
Kishore Suthar Avatar asked Feb 26 '19 10:02

Kishore Suthar


2 Answers

Stop remote JS debugging and then reload the app

It will give you the appropriate error message, most likely missing some render on one of your components. That fixed it for me.

like image 128
Hackman Avatar answered Nov 03 '22 00:11

Hackman


So this issue happened to me after I upgraded to RN 0.59.x. I was getting this error when live reload was enabled or if i tried to refresh screen on iOS by pressing CMD+R.

Related issues:

  • Unable to find module for UIManager
  • Unable to find module for DevLoadingView
  • Unable to find module for EventDispatcher

Here's how I solved it:

Edit your AppDelegate.m file and add the following code before the @end

 #if RCT_DEV - (BOOL)bridge:(RCTBridge *)bridge didNotFindModule:(NSString *)moduleName {   return YES; } #endif 

This will fix the issue.

  • Link to the fix on github.
  • Related discussion on github.

Live reload and debug mode all should work without problems now.

like image 37
Oleg Dater Avatar answered Nov 03 '22 00:11

Oleg Dater