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

ViewPropTypes has been removed from React Native. #129

Open
FelipeSD opened this issue Aug 22, 2022 · 3 comments
Open

ViewPropTypes has been removed from React Native. #129

FelipeSD opened this issue Aug 22, 2022 · 3 comments

Comments

@FelipeSD
Copy link

FelipeSD commented Aug 22, 2022

I'm getting this error from the lib using React Native v0.69.4

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

image

print

My package.json dependencies:

"dependencies": {
"@expo-google-fonts/inter": "^0.2.2",
"@expo-google-fonts/poppins": "^0.2.2",
"@gorhom/bottom-sheet": "4",
"@react-native-async-storage/async-storage": "^1.17.9",
"@react-navigation/drawer": "^6.4.3",
"@react-navigation/native": "^6.0.11",
"@react-navigation/native-stack": "^6.7.0",
"@reduxjs/toolkit": "^1.8.4",
"expo": "~46.0.3",
"expo-auth-session": "~3.7.1",
"expo-constants": "~13.2.3",
"expo-crypto": "~11.0.0",
"expo-dev-client": "~1.2.1",
"expo-firebase-core": "~5.1.1",
"expo-font": "^10.2.0",
"expo-linking": "~3.2.2",
"expo-random": "~12.3.0",
"expo-splash-screen": "^0.16.1",
"expo-status-bar": "~1.4.0",
"expo-system-ui": "^1.3.0",
"formik": "^2.2.9",
"i18next": "^21.9.0",
"intl": "^1.2.5",
"intl-pluralrules": "^1.3.1",
"native-base": "^3.4.11",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-i18next": "^11.18.3",
"react-native": "0.69.4",
"react-native-dotenv": "^3.3.1",
"react-native-gesture-handler": "^2.5.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "^2.9.1",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.15.0",
"react-native-svg": "12.3.0",
"react-native-swipeable": "^0.6.0",
"react-native-uuid": "^2.0.1",
"react-native-web": "^0.18.7",
"react-redux": "^8.0.2",
"redux": "^4.2.0",
"rn-select-date-range": "^3.2.2",
"victory-native": "^36.6.0",
"yup": "^0.32.11"
},
"devDependencies": {
"@babel/core": "^7.18.10",
"@types/intl": "^1.2.0",
"@types/react": "^18.0.17",
"@types/react-native": "^0.69.5",
"@types/react-native-dotenv": "^0.2.0",
"react-native-svg-transformer": "^1.0.0",
"typescript": "^4.7.4"
},

@foolem
Copy link

foolem commented Aug 26, 2022

+1

@foolem
Copy link

foolem commented Aug 26, 2022

For now you need to use the patch-package lib to apply a patch and adjust these calls from React Native to the deprecated view props lib
Screen Shot 2022-08-26 at 4 35 16 PM

@safeer-ahmed
Copy link

Here is how I applied the patch.

  1. Import deprecated prop types in index.js with the following code:
    var _deprecatedPropTypes = require('deprecated-react-native-prop-types');

Screenshot 2023-01-02 at 12 14 09 PM

  1. Now update the lines 606-612 of index.js as:

Screenshot 2023-01-02 at 12 12 11 PM

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

3 participants