I’m working on a small app. When reaching a page using react-native-tab-view
, the below error occurs:
ERROR Invariant Violation: requireNativeComponent: "RNCViewPager" was not found in the UIManager.
This error is located at:
in RNCViewPager (at PagerView.tsx:207)
in PagerViewInternal (at PagerView.tsx:233)
in Unknown (at createAnimatedComponent.js:54)
in Unknown (at PagerViewAdapter.tsx:143)
in PagerViewAdapter (at TabView.tsx:84)
in RCTView (at View.js:116)
in View (at TabView.tsx:83)
I believe this error relates to react-native-pager-view
. However, I clearly have that installed in my package.json.
{
"name": "*****",
"version": "0.2",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"devtools": "react-devtools",
"test": "jest --detectOpenHandles",
"lint": "eslint ."
},
"dependencies": {
"@babel/plugin-transform-object-rest-spread": "^7.24.5",
"@expo/config-plugins": "~7.8.0",
"@expo/prebuild-config": "~6.7.0",
"@firebase/app": "^0.9.16",
"@firebase/firestore": "^4.1.1",
"@gorhom/bottom-sheet": "^4.6.1",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-navigation/native": "^6.1.9",
"@react-navigation/stack": "^6.3.17",
"@redux-devtools/extension": "^3.3.0",
"@redux-devtools/instrument": "^2.2.0",
"@redux-devtools/serialize": "^0.4.2",
"@reduxjs/toolkit": "^1.9.5",
"@sentry/cli": "^2.31.1",
"@sentry/react-native": "~5.20.0",
"date-fns": "^2.30.0",
"expo": "~50.0.17",
"expo-build-properties": "~0.11.1",
"expo-constants": "~15.4.6",
"expo-dev-client": "~3.3.11",
"expo-splash-screen": "~0.26.5",
"firebase": "^10.2.0",
"i18next": "^23.6.0",
"i18next-react-native-async-storage": "^1.0.4",
"normalizr": "^3.6.2",
"react": "18.2.0",
"react-devtools": "^4.28.0",
"react-i18next": "^13.3.1",
"react-native": "0.73.6",
"react-native-calendars": "^1.1300.0",
"react-native-elements": "^3.4.3",
"react-native-gesture-handler": "~2.14.0",
"react-native-get-random-values": "~1.8.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-modal": "^13.0.1",
"react-native-pager-view": "^6.3.1",
"react-native-paper": "^5.11.1",
"react-native-paper-dates": "^0.20.5",
"react-native-popup-menu": "^0.16.1",
"react-native-reanimated": "~3.6.2",
"react-native-reanimated-carousel": "^3.5.1",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-svg": "14.1.0",
"react-native-tab-view": "^3.5.2",
"react-native-webview": "13.6.4",
"react-redux": "^8.1.2",
"redux": "^4.2.1",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.2",
"reselect": "^4.1.8",
"uuid": "^9.0.1",
"victory-native": "^36.6.12"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.7",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.4.3",
"babel-jest": "^29.7.0",
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.1.0",
"jest": "^29.7.0",
"jest-expo": "~50.0.4",
"react-test-renderer": "^18.2.0",
"remote-redux-devtools": "^0.5.16"
},
"private": true
}
I’ve tried deleting node_modules then running npm install, rebuilding the app (for android) and still receiving this issue.
I see many other pages relating to this problem but none of them seem to be quite recent or relating to Expo.
Hopefully someone can lead me in the right direction with this issue.
Thanks.
JohnTech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.