Jakub Jarząbek
Jakub Jarząbek

Reputation: 340

React Native Video - undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode'

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?

Upvotes: 4

Views: 2865

Answers (3)

Naveed Shk
Naveed Shk

Reputation: 11

Go to the package.json file and remove:

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

Then type: npm i in terminal

Upvotes: -1

Vaibhav Gehani
Vaibhav Gehani

Reputation: 25

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.

Upvotes: 0

Jakub Jarząbek
Jakub Jarząbek

Reputation: 340

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

Upvotes: 8

Related Questions