react-native-pager-view icon indicating copy to clipboard operation
react-native-pager-view copied to clipboard

InvariantViolation : requireNativeComponent RNCViewpager was not found in the UI manager

Open sharief-edv opened this issue 7 years ago • 32 comments

image

sharief-edv avatar Mar 18 '19 09:03 sharief-edv

1.cd ios 2.sudo gem install cocoapods 3.Pod install

MelchizedekV avatar Oct 28 '19 16:10 MelchizedekV

@DrobyshevAlex you cannot as this library is not supported by Expo. You would have to eject your project.

The interesting thing is that Expo people recommend using the react-native-viewpager instead of one of their deprecated interface. It is literally the first-line link on the ViewPagerAndroid page.

yzalvov avatar Nov 24 '19 14:11 yzalvov

I am on RN 61.5 with "@react-native-community/viewpager": "^3.1.0" and got crashes on iOS (not Android) with the said error. What helped was manually linking the dependancy for iOS: put

  pod 'react-native-viewpager', :path => '../node_modules/@react-native-community/viewpager'

in your Podfile and run cd ios && pod install

aryojamousi avatar Dec 02 '19 12:12 aryojamousi

I had the same issue using react-native 0.61.4 and "@react-native-community/viewpager": "^3.3.0" on android. It was resolved after doing react-native link @react-native-community/viewpager. Why do i have to link it when react native uses auto linking ?

sushrut-desora avatar Feb 13 '20 16:02 sushrut-desora

i have used library react-native-scrollable-tab-view version 1.0.0, it has dependency @react-native-community/viewpager then error ocurce. But when i downgrade to version 0.10.0 this error is gone.

DatNguyenCore avatar Apr 05 '20 09:04 DatNguyenCore

if you're using expo and you have this issue make sure you're on sdk-37 and see this docs page for installation instructions https://docs.expo.io/versions/latest/sdk/view-pager/

brentvatne avatar May 16 '20 20:05 brentvatne

@yzalvov - we only release sdks once per quarter, so all you need is for someone to make a change in one of the react-native-community repos one day after that release and then there is nothing we can do until the next release. so that is why you would have seen different recommendations in the docs. w

brentvatne avatar May 16 '20 20:05 brentvatne

I checked and autolinking for 0.62 here: https://github.com/troZee/viewPagerExample/tree/autolinking

And everything works fine.

troZee avatar May 19 '20 12:05 troZee

i had same issue, is it maybe the problem is only for expokit app (eject from manage workflow). Because my apps didnt get any autolinking, include viewpager

ghost avatar Jun 05 '20 15:06 ghost

Getting the same error Invariant Violation: Invariant Violation: requireNativeComponent : "RNCViewPager" was not found in the UIManager".

I run both the commands

1. ```
   For installation
    npm install @react-native-community/viewpager
   ```

2. ```
   For linking the library
    react-native link @react-native-community/viewpager
   ```

System configuration : System: OS: Linux 4.15 Ubuntu 18.04.2 LTS CPU: (6) x64 AMD FX(tm)-6300 Six-Core Processor Memory: 920.17 MB / 3.59 GB

Binaries:
  Node: 8.16.0
  npm: 6.4.1
npmPackages:
  react: 16.8.3 => 16.8.3 
  react-native: 0.59.5 => 0.59.5 
npmGlobalPackages:
  react-native-cli: 2.0.1

saved my time :) thanks a million

Niz47 avatar Aug 11 '20 20:08 Niz47

i had same issue, is it maybe the problem is only for expokit app (eject from manage workflow). Because my apps didnt get any autolinking, include viewpager

It might be related to this issue. https://github.com/expo/expo-cli/issues/1398

sushrut-desora avatar Aug 12 '20 14:08 sushrut-desora

To make it work on ios I had to do

react-native link react-native-pager-view cd ios; pod install; cd ..

React Native version "react-native": "0.63.2", Pager View version "react-native-pager-view": "^5.1.5",

narek11 avatar Apr 23 '21 10:04 narek11