callstack / react-native-pager-view

React Native wrapper for the Android ViewPager and iOS UIPageViewController.
MIT License
2.57k stars 399 forks source link

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

Open Snehalphutane opened 1 year ago

Snehalphutane commented 1 year ago

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

when i added this dependancy and run my app then it gave me this error. and i try to find out where 'ViewPropTypes' is used in this dependancy but i found that they use only 'ViewProp' in PagerViewNativeComponent.ts file Untitled

okwasniewski commented 1 year ago

Hey @Snehalphutane,

Can you provide the versions of dependencies that you are using? When is this error popping up?

Snehalphutane commented 1 year ago

For using react-native-tab-view dependency I need to add this react-native-pager-view dependency, but when I added react-native-pager-view dependency by using npm install and run project with react-native run-android that time it gave me error on react-native metro bundler. My package.json "dependencies": { "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-community/datetimepicker": "^6.7.0", "@react-native-community/geolocation": "^3.0.3", "@react-native-masked-view/masked-view": "^0.2.8", "@react-native-picker/picker": "^2.4.8", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/material-top-tabs": "^6.3.0", "@react-navigation/native": "^6.0.13", "@react-navigation/native-stack": "^6.9.1", "deprecated-react-native-prop-types": "^2.3.0", "moment": "^2.29.4", "react": "18.1.0", "react-native": "0.70.5", "react-native-android-location-enabler": "^1.2.2", "react-native-calendars": "^1.1291.1", "react-native-countdown-component": "^2.7.1", "react-native-document-picker": "^8.1.2", "react-native-flatlist-slider": "^1.0.6", "react-native-image-picker": "^4.10.1", "react-native-image-slider-box": "^2.0.7", "react-native-image-viewing": "^0.2.2", "react-native-linear-gradient": "^2.6.2", "react-native-maps": "^1.3.2", "react-native-modal-selector": "^2.1.2", "react-native-orientation": "^3.1.3", "react-native-pager-view": "^6.1.0", "react-native-paper": "^4.12.5", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "^3.18.2", "react-native-skeleton-placeholder": "^5.2.4", "react-native-snackbar": "^2.4.0", "react-native-tab-view": "^3.3.0", "react-native-vector-icons": "9.2.0", "react-native-video": "^5.2.1", "react-native-video-controls": "^2.8.1", "react-native-webview": "^11.23.1", "react-native-youtube": "^2.0.2", "react-native-youtube-iframe": "^2.2.2", "rn-fetch-blob": "^0.12.0" },

node version - v14.15.1 npm - 6.14.8