Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Unable to resolve module ` react-native-screens` from `node_modules/react-navigation-tabs/src/navigators/createBottomTabNavigator.js`

Tags:

Current Behavior

  • After executing app is not installing reporting
bundling failed: Error: Unable to resolve module ` react-native-screens` from `node_modules/react-navigation-tabs/src/navigators/createBottomTabNavigator.js`: react-native-screens could not be found within the project. 

Your Environment

| software | version |

| react-navigation | 3.11.1

| react-native | 0.61.2

| node | 12.13.0

like image 514
Fazle Rabbi Ador Avatar asked Feb 04 '20 05:02

Fazle Rabbi Ador


People also ask

Why my react navigation is not working?

This might happen if you have an old version of the metro-react-native-babel-preset package. Try upgrading it to the latest version. If you have @babel/core installed, also upgrade it to latest version.

What is react-native screens?

react-native-screens provides native primitives to represent screens instead of plain <View> components in order to better take advantage of operating system behavior and optimizations around screens. This capability is used by library authors and unlikely to be used directly by most app developers.


2 Answers

well i have solved this by reinstalling / updating these packages.

npm install --save react-native-gesture-handler react-native-reanimated react-native-screens

like image 149
Fazle Rabbi Ador Avatar answered Oct 12 '22 05:10

Fazle Rabbi Ador


If you are using react-navigation in your bare react-native project do not forget to also install the following required dependencies:

npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view

...or with expo

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

like image 25
M_droid Avatar answered Oct 12 '22 05:10

M_droid