Invariant Violation: new NativeEventEmitter() requires a non-null argument

Viewed 25852

image I am developing an ios app but i got dependency issues and

Invariant Violation: new NativeEventEmitter() requires a non-null argument. error


import { NativeModules, NativeEventEmitter } from 'react-native';
const razorpayEvents = new NativeEventEmitter(NativeModules.RazorpayEventEmitter);

NativeModules.RazorpayEventEmitter is empty .

3 Answers

Go to ios folder then remove

  1. Pods & Podfile.lock
  2. run pod install
  3. Rebuild project

And make sure you have followed the installation instruction correctly. Drawer Installation

I hope it can solve your issue.

I used drawer navigation in my react app and then faced same issue. Go to ios directory and say pod install. Rebuild your application. This solved my issue.

Install react-native-reanimated module

it solved everything for me.

npm i react-native-reanimated
Related