Unable to find module for EventDispatcher React Native

React Native

React Native Problem Overview


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

enter image description here

React Native Solutions


Solution 1 - React Native

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.

Solution 2 - React Native

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.

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

Solution 3 - React Native

This seems to be an issue when using the remote debugger with certain RN versions above 0.58. Using react-native-debugger should solve the issue as it supports RN versions above already.

It can be downloaded from the following link: https://github.com/jhen0409/react-native-debugger/releases

Solution 4 - React Native

I've started receiving this error after upgrading RN from v0.57.3 to v0.58.6. Running packager with yarn start -reset-cache / react-native start --reset-cache fixed the issue for me.

Solution 5 - React Native

What worked for me was simply stopping remote debugging as mentioned by @Hackman, THEN killing the browser debugger, cleaning Xcode and rebuilding.

Couldn't tell you why, but the issue went away.

Solution 6 - React Native

I'm using detox, what worked for me was switching the build command from

-configuration Debug to -configuration Release

It will no longer fetch from metro bundler and instead use the js bundle from the build. When I'm coding the tests, I build with debug since I'm fine with occasionally seeing the error, since I like the connivence of not having to constantly build and letting metro bundler do it for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKishore SutharView Question on Stackoverflow
Solution 1 - React NativeHackmanView Answer on Stackoverflow
Solution 2 - React NativeOleg DaterView Answer on Stackoverflow
Solution 3 - React NativejschussView Answer on Stackoverflow
Solution 4 - React NativePeter MachowskiView Answer on Stackoverflow
Solution 5 - React NativekingPuppyView Answer on Stackoverflow
Solution 6 - React NativeSatbir KiraView Answer on Stackoverflow