You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: Invariant Violation requireNativeComponent: "RNCViewPager" was ton found in the UIManager #1050
Should work because I setup latest version of module. And in yarn.lock:
also ViewPager there is in node_modules:
Actual Behavior
Android
iOS
All fine.
I've try
Clean yarn cache
Clean react native & metro cache
rm -rf node_modules
delete build folders
Reacted by Mateusz Janik, ZhangPeng, Dean Guo, Ed Ryan Alburo, ChauVV, sahil-kc, SemperChen, sunzhongke-hualai, OhashiMiku, Nikolai Belikov and 13 more
I have the same issue on Android. Manually adding @react-native-community/viewpager didn't solve the problem for me.
Reacted by Sassan Haradji, Mateusz Janik, Nitay Rabinovich, Sangyun Pae, zzyjiaxinmomo, ZhangPeng, w13808604, Ed Ryan Alburo, GitHub_xy, Domtry and 12 more
but I don't want to install that module direct into project :(
I guess there will be no issue in doing that I guess. npm will manage dependencies right? Is there will be any issue will come if you modify its dependencies? Please let me know.
Thanks
But when you search in project directory @react-native-community/viewpager it's returns nothing. Then other developers thinks like 'oh, that dependency is not used in project so it unnecessary, I can delete it!'.
And build fails next time)))))))
also guys above says that solution didn't work. I don't know why. In my case it works.
yarn add @react-native-community/viewpager on it's own does not solve the issue, you need to link the package also using react-native link @react-native-community/viewpager
yarn add @react-native-community/viewpager react-native link @react-native-community/viewpager
and rebuild, solve it ✨
Reacted by Saathwik, Tim-Zhang, Kaiyes Ansary, xgAnd, SemperChen, paulLee, Winsey Li, chenliwu, Syed Zain Ali, lovcl and 38 more
Reacted by villa_mou, Nikolai Belikov, zyslife, martin ngigi, Abhishek Srivastava, Hans Hohenstein, Cp-stark, recettes-faciles, Асем, Itangjie and 6 more
Reacted by Saathwik, Kaiyes Ansary, paulLee, LennonZhong, Hoa NgX, pankajguptablueivory, Anna Beddow, Ahmet ÇAĞLAYAN, Lucas Augusto Mendes Rodrigues, André Ribeiro and 4 more
Reacted by André Ribeiro, Marquis Alexander, 子羽, Nibras Khan and maustruy
Reacted by Kailash Uniyal, LennonZhong, Hoa NgX, pankajguptablueivory, Anna Beddow, Ahmet ÇAĞLAYAN, Lucas Augusto Mendes Rodrigues, Pavithra Purushothaman, axsnmqp, IceColdLight and 8 more
Reacted by Kaiyes Ansary, paulLee, Hoa NgX, pankajguptablueivory, Anna Beddow, Ahmet ÇAĞLAYAN, Lucas Augusto Mendes Rodrigues, Pavithra Purushothaman, IceColdLight, Shrikant Jha and 5 more
Edit: I spoke too soon, this breaks iOS so I had to add this to my postinstall script:
RN_VIEWPAGER_FILE="./node_modules/@react-native-community/viewpager/react-native-viewpager.podspec"
if [ -e $RN_VIEWPAGER_FILE ]; then
echo "Patching @react-native-community/viewpager to not autolink (we only want this peer dep on Android)"
rm -rf $RN_VIEWPAGER_FILE
fi
Last update... I downgraded my version of @react-native-community/viewpager to 3.3 (matches the master branch of this repo) and now everything is playing nicely. Removed the postinstall steps above.
This issue is caused by the wrong dependency version,
and it's fixed in the commit 510111adce035a54ecb1b5f77b78e3bfaf513260,
but not officially released.
To install the specific commit version instead of the official released one, run
Activity
zmnv commentedon Oct 29, 2019
I look at:
/node_modules/react-native-scrollable-tab-view/index.js
Why do you use
Animated.ScrollViewfor iOS andAnimatedViewPagerAndroidfor Android? Can you useAnimated.ScrollViewfor all?also there are definitions which don't used
zmnv commentedon Oct 29, 2019
temporary solution is just:
but I don't want to install that module direct into project :(
ptomasroos commentedon Oct 29, 2019
I would love to have a PR on a scroll based solution of android. It’s there for historical reasons.
haack commentedon Oct 31, 2019
I have the same issue on Android. Manually adding
@react-native-community/viewpagerdidn't solve the problem for me.zunsakai commentedon Oct 31, 2019
same issue ...
cereme commentedon Nov 2, 2019
I have same issue too
vetrivendhan48 commentedon Nov 4, 2019
I guess there will be no issue in doing that I guess. npm will manage dependencies right? Is there will be any issue will come if you modify its dependencies? Please let me know.
Thanks
zmnv commentedon Nov 4, 2019
@vetrivendhan48 not a big deal actually, but.
But when you search in project directory
@react-native-community/viewpagerit's returns nothing. Then other developers thinks like 'oh, that dependency is not used in project so it unnecessary, I can delete it!'.And build fails next time)))))))
also guys above says that solution didn't work. I don't know why. In my case it works.
azamouchi commentedon Nov 6, 2019
yarn add @react-native-community/viewpageron it's own does not solve the issue, you need to link the package also usingreact-native link @react-native-community/viewpagerw13808604 commentedon Nov 8, 2019
same issue ..anybody solve it
chenyanfei-m commentedon Nov 8, 2019
yarn add @react-native-community/viewpagerreact-native link @react-native-community/viewpagerand rebuild, solve it ✨
mastahed commentedon Nov 12, 2019
Any fix for expo 35 with RN 0.59? works well on IOS, android shows the same error. Tried link and manual installation of viewpager.
kaiyes commentedon Nov 18, 2019
This worked for me
xgAnd commentedon Nov 18, 2019
worked react-native version is 0.61.3
winseyli commentedon Nov 28, 2019
Thank you this works for me too. RN 0.61.4
(Seems like it is not necessary to link the package if there is autolinking for >=0.60)
15 remaining items
nabilfreeman commentedon May 4, 2020
Hi, I just ran
npm install --save @react-native-community/viewpagerand it autolinked.I also made sure that my
react-native-scrollable-tab-viewversion is the latest commit on master (not npm).To confirm... no manual steps required!! 🎉
Edit: I spoke too soon, this breaks iOS so I had to add this to my postinstall script:
So now...
react-native-scrollable-tab-viewadds@react-native-community/viewpager@3.3@react-native-community/viewpager@4installed frompackage.jsonEverything works.
I think the ideal would be to remove viewpager as a dep from this library and instead have it as a required peer dependency.
nabilfreeman commentedon May 5, 2020
Last update... I downgraded my version of
@react-native-community/viewpagerto 3.3 (matches the master branch of this repo) and now everything is playing nicely. Removed the postinstall steps above.deot commentedon May 21, 2020
package.jsonAndroid > 60.0, check file:
android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.javalink
simo-hsieh commentedon Jun 22, 2020
This worked for me.
This issue is caused by the wrong dependency version,
and it's fixed in the commit 510111adce035a54ecb1b5f77b78e3bfaf513260,
but not officially released.
To install the specific commit version instead of the official released one, run
RN v0.61
RN v0.62
heyixing commentedon Jul 22, 2020
it's also worked for me ,thanks!
bobananto24 commentedon Feb 12, 2021
run the command "react-native run-android" or "react-native run-ios" instead of "react-native start"
hungdev commentedon Mar 6, 2021
Thank u, those versions worked for me
andresribeiro commentedon Jun 18, 2021
It worked with React Native version 0.64.2. Thanks!
douglassoldan commentedon Oct 8, 2021
@react-native-community/viewpager is deprecated!
run projetc!
Works here! ;-)
deepakkathuria commentedon Dec 23, 2021
1.react-native link @react-native-community/viewpager
2. npx react-native run-android
3. npx react-native start
zchuhui commentedon Dec 29, 2021
thanks bro!!!!
Hudson-AmalembaL commentedon Dec 13, 2023
Make sure to
clear the node_modules make a fresh installthen
That worked for me
JustAiham commentedon Aug 7, 2026
For anyone in 2026, rebuilding and installing the new build might fix it.
I did:
eas build --platform android --profile developmentThen installed the build on my android and everything worked.