Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mayurkapare opened this issue Jul 5, 2022 · 8 comments

Comments

@mayurkapare
Copy link

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

@ant100
Copy link

ant100 commented Jul 7, 2022

+1 getting same error

@PragathiPrabhu
Copy link

Facing same issue

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

@AbdelrhmanFathy
Copy link

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

@takashi-uix
Copy link

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

@NguyenPhuongNam99
Copy link

@AbdelrhmanFathy thank you very much

@namlq93
Copy link

namlq93 commented Oct 1, 2022

use react-native 0.68 version 🙄

@oxilor
Copy link

oxilor commented Dec 25, 2022

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...

@harisbaig100
Copy link

it was fixed using this PR #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants