Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module `react-navigation-tabs` does not exist in the Haste module map

I try to create a tab navigation in react native. But when I want to import import { createBottomTabNavigator } from 'react-navigation-tabs';. I have the following error : bundling failed: Error: Unable to resolve module `react-navigation-tabs` from `/Users/nicolasthibault/Desktop/RunApplication/Runenger/Views/NavigationReact.js`: Module `react-navigation-tabs` does not exist in the Haste module map.

I tried many commands that I found to similar topic but any of them works in my situation. For example, I tried these ones but it doesn't solve my problem.

1. Clear watchman watches: `watchman watch-del-all`. 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`. 3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.

Thanks for your help.

like image 390
THIBAULT Nicolas Avatar asked Jan 25 '26 03:01

THIBAULT Nicolas


2 Answers

Install react-navigation-tabs:

yarn add react-navigation-tabs

Or

npm install react-navigation-tabs

Then run metro:

react-native start --reset-cache

Also make sure you've followed the instructions here: https://reactnavigation.org/docs/en/getting-started.html

like image 106
satya164 Avatar answered Jan 28 '26 08:01

satya164


1) Install 'react-navigation-tabs' using either npm or yarn 2) Build your project using npm start --reset-cache, If you are using expo use expo r -c

It'll work.

like image 41
Abhik Avatar answered Jan 28 '26 08:01

Abhik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!