最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - react-native-video: Cannot read property 'Constants' of null - Stack Overflow

matteradmin1PV0评论

I am trying to include a YouTube video in my react native project. Since I already tried react-native-youtube and did not work at all I tried installing react-native-video.

However, I am getting the following error:

I tried: deleting my node_modules and npm i again followed by react-native link and react-native link react-native-video. Several times.

My package.json:

I am trying to include a YouTube video in my react native project. Since I already tried react-native-youtube and did not work at all I tried installing react-native-video.

However, I am getting the following error:

I tried: deleting my node_modules and npm i again followed by react-native link and react-native link react-native-video. Several times.

My package.json:

Share Improve this question asked Feb 1, 2020 at 15:17 HristoTotovHristoTotov 1532 gold badges2 silver badges5 bronze badges 2
  • your source? <Video /> ponent parameters? .... from source ` const RCTVideoInstance = this.getViewManagerConfig('RCTVideo');` fails – xadm Commented Feb 1, 2020 at 15:56
  • This is happening to me on android too, any help? – J-- Commented Jan 2, 2022 at 11:07
Add a ment  | 

6 Answers 6

Reset to default 2

For Android using Expo and EAS Build I just ran

eas build --profile development --platform android

This fixed my issue

I assume with pure React Native too you just need to rebuild the App.

react-native: 0.63.4: the problem is with linking, the issue got fixed by following these steps:

  • -removing the Pods folder from the ios folder:
  • -removing the node modules
  • -removing the build using this mand: rm -rf ios/build
  • -running Yarn to reinstall the packages
  • -installing Pods using this mand: cd ios && pod install --repo-update && cd ..
  • -running the ios build
  • -starting react native and removing the cache with this mand: yarn start --reset-cache

This worked for me

  • react-native link
  • cd ios && pod install
  • check in podfile that react-native-video is added or not.
  • If not add it manually and run pod install.
  • then in xcode build Phases check search video , if you found video package already added then run app and check.
  • otherwise add it manually in Link Binary with Libraries.
  • and run app.

for me it was closing the metro window (I switched from project with react-native-video to a project with expo-av)

For me, it was downloading packages with npm. I had installed expo-CLI and was downloading packages for react-native CLI. There's some cross package error i guess however if you're using expoCLI and missed this by mistake you can clean node_modules remove package-lock.json and use expo-video. https://docs.expo.dev/versions/latest/sdk/video/ or https://www.npmjs./package/expo-video-player

npm i expo-video-player

An old build was the root of my problem. Had to delete the app and reinstall with xcode. Classic rinse and repeat.

"react-native": "0.74.3", "react-native-video": "^5.2.1",

For reference: https://github./TheWidlarzGroup/react-native-video/issues/1738#issuement-533917249

Post a comment

comment list (0)

  1. No comments so far