Unable To Resolve module react-native-pager-view React Native

9k views Asked by At

I am learning react native. When installing the app in simulator, i am facing an issue which is following. Please provide any solution.

If i install react-native-pager-view then it throws error. And when i uninstalled it. It is throwing following error-:

   Unable to resolve module react-native-pager-view in the root directory.

enter image description here

4

There are 4 answers

0
Rakesh Saini On

I solved this problem by doing pod install and removing some other dependencies. I install and uninstall this dependency several times. Finally i deleted this and at last it works. Restart vs code.

1
Thanh Chương On

Try running this command:

rm -rf yarn.lock node_modules ios/Pods ios/Podfile.lock && yarn install && cd ios && pod install && cd ..
0
M.Daniyal Aslam On

I think you're using material top tab navigation from react-navigation, and this requires some extra dependencies which you need to install before using react-navigation

for ref please visit react navigation official site.

To fix this, please run yarn add react-native-tab-view react-native-pager-view and then pod install

may be your problem will solve.

0
ElManini On

I've solved this issue by running:

yarn add react-native-pager-view