28

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 .

Sabaoon Bedar
  • 3,113
  • 2
  • 31
  • 37
baiju
  • 381
  • 1
  • 3
  • 3

4 Answers4

28

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.

july77
  • 673
  • 2
  • 8
  • 24
3

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.

1

I have added below line in my .zshrc file:

export LANG=en_US.UTF-8

and then i ran command

source .zshrc

to save the changes in .zshrc file.

then did pod install and it worked.

amit pandya
  • 1,384
  • 13
  • 22
0
  1. npm i (check if you have any failed dependency downloads and user either --force or --legacy-peer-deps)
  2. cd ios && pod install
  3. cmd + shift + k and re-run your app!
shiraz27
  • 1,898
  • 18
  • 14