Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 .

like image 744
baiju Avatar asked Sep 07 '21 07:09

baiju


Video Answer


2 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.

like image 111
july77 Avatar answered Nov 07 '22 08:11

july77


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.

like image 22
Gauri Ambekar Avatar answered Nov 07 '22 08:11

Gauri Ambekar