3

I'm using react-native-video in react-native v0.69 withing nx monorepo and when trying to add Video component like below, I get an error TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode'.

import Video from 'react-native-video'

  <Video
     resizeMode="none"
     source={{ uri: _.url }}
     style={{ width: 64, height: 64 }}
  />

When i remove resizeMode prop I get same error. What is causing this?

Jakub Jarząbek
  • 195
  • 1
  • 6

3 Answers3

7

I've managed to solve it. For react-native 0.69,^6.0.0-alpha.1 version of react-native-video fix the issue

Jakub Jarząbek
  • 195
  • 1
  • 6
0

We have to install 6.0.0-alpha.1, but pod install can give some errors. But those error's can be resolved using below commands:

sudo arch -x86_64 gem install ffi

and then go to the iOs folder and run:

arch -x86_64 pod install

It will work.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
-1

Go to the package.json file and remove:

"react-native-video": "^6.0.0-alpha.1"

Then type: npm i in terminal

Tyler2P
  • 2,324
  • 26
  • 22
  • 31