4

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?

3 Answers 3

8

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

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

-1

Go to the package.json file and remove:

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

Then type: npm i in terminal

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.