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
6 Answers
Reset to default 2For 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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743758747a4502232.html
评论列表(0条)