react-native-youtube icon indicating copy to clipboard operation
react-native-youtube copied to clipboard

Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Open mayurkapare opened this issue 2 years ago • 8 comments

"react-native": "0.69.1", "react-native-youtube": "^2.0.2",

mayurkapare avatar Jul 05 '22 09:07 mayurkapare

+1 getting same error

ant100 avatar Jul 07 '22 09:07 ant100

Facing same issue

"dependencies": { "react": "18.0.0", "react-native": "0.69.1", "react-native-youtube": "^2.0.2" },

PragathiPrabhu avatar Jul 10 '22 12:07 PragathiPrabhu

I faced the same issue and did the following to solve it :

1- remove react-native-youtube **yarn remove react-native-youtube **

2- install react-native-youtube version 2.0.0 ** yarn add [email protected]**

3- from your root project go to the lib folder cd node_modules/react-native-youtube

4- install deprecated-react-native-prop-types ** npm i deprecated-react-native-prop-types**

5- for files "YouTube.android.js" and "YouTube.ios.js" replace import { ViewPropTypes } from 'react-native'; with import { ViewPropTypes } from 'deprecated-react-native-prop-types';

Hope is helpful

AbdelrhmanFathy avatar Jul 15 '22 04:07 AbdelrhmanFathy

The above is not a permanent solution enough to get it work

takashi-uix avatar Jul 22 '22 12:07 takashi-uix

@AbdelrhmanFathy thank you very much

NguyenPhuongNam99 avatar Aug 02 '22 15:08 NguyenPhuongNam99

use react-native 0.68 version 🙄

namlq93 avatar Oct 01 '22 00:10 namlq93

The above is not a permanent solution enough to get it work

Use the patch-package. It allows you to modify files in any library and memorize this changes, so that every time you run yarn install, these fixes will be applied.

I hope this will be fixed in the react-native-youtube library someday...

oxilor avatar Dec 25 '22 15:12 oxilor

it was fixed using this PR https://github.com/davidohayon669/react-native-youtube/pull/538 but the new version never got released. I don't see these changes in version 2.0.2 which was release 3 years ago and then no version was released

harisbaig100 avatar May 09 '24 09:05 harisbaig100