Search code examples
reactjsreact-native

new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method


I cannot resolve the issue. When application loads react native throw warnings.

WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.

Solution

  • It is the issue related with react native reanimated library. I solve it by uninstalling the library and reinstalling it. Remove all the installation steps of react-native-reanimated library provided by https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/#installation.

    Simply install library using command npm install [email protected]

    If the issue still then open project in android studio. Go to file->invalidate cache. After it all things work right.