Issue
React native project running fine without react navigation tab module, once I installed the tab module using
npm install --save react-navigation-tab
The following error occure on node terminal.
React-tab-navigation throwing the following error.
error: bundling failed: Error: Unable to resolve module react-native-reanimated
from node_modules\react-navigation-tabs\lib\module\views\MaterialTopTabBar.js
: react-native-reanimated could not be found within the project.
Solution
react-navigation-tabs depends on react-navigation package.
So I think you missed the Getting Started section.
Currently for react-navigation 4.x you should:
yarn add react-navigation
yarn add react-native-reanimated react-native-gesture-handler react-native-screens@^1.0.0-alpha.23
Then for ios:
cd ios
pod install
To finalize installation of react-native-screens for Android, add the following two lines to dependencies section in android/app/build.gradle
:
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
And then
react-native link react-native-reanimated
Answered By - chenop
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.