Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[5], "./AnimatedTabBar").AnimatedTabBar') #134

Open
sammysmart95 opened this issue Jan 28, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@sammysmart95
Copy link

Bug

image

Here is my src code

import React from 'react';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import AnimatedTabBar from '@gorhom/animated-tabbar';
import Notification from '../screens/NotificationScreen/NotificationScreen';
import Chat from '../screens/ChatScreen/ChatScreen';
import Home from '../screens/HomeScreen/HomeScreen';
import Booking from '../screens/BookingScreen/BookingScreen';
import Profile from '../screens/ProfileScreen/ProfileScreen';
import colours from '../assets/colors';
import IconGenerator from '../components/IconGenerator';
import {appFonts} from '../assets/scale';

const Tabs = createBottomTabNavigator();

const iconProperty = iconName => ({
labelStyle: {
color: colours.primary,
fontFamily: appFonts.regularText.fontFamily,
},
icon: {
component: () => (

),
inactiveColor: colours.primary,
activeColor: colours.primary,
},
background: {
activeColor: 'rgba(0, 191, 166, 0.18)',
inactiveColor: 'rgba(223,215,243,0)',
},
});

const tabs = {
Notification: iconProperty('Notification'),
Chat: iconProperty('Chat'),
Home: iconProperty('Home'),
Bookings: iconProperty('Bookings'),
Profile: iconProperty('Profile'),
};

const TabScreens = () => (
<Tabs.Navigator
tabBar={props => <AnimatedTabBar tabs={tabs} {...props} />}
initialRouteName="Home"
tabBarOptions={{
style: {
backgroundColor: colours.background,
},
}}>
<Tabs.Screen name="Notification" component={Notification} />
<Tabs.Screen name="Chat" component={Chat} />
<Tabs.Screen name="Home" component={Home} />
<Tabs.Screen name="Booking" component={Booking} />
<Tabs.Screen name="Profile" component={Profile} />
</Tabs.Navigator>
);

export default TabScreens;

Environment info

Library Version
"@gorhom/animated-tabbar": "^2.1.2"
"react-native": "0.66.4"
"react": "17.0.2",
"react-native-reanimated": "^2.3.1",
"react-native-gesture-handler": "^2.1.0",
"react-native-svg": "^12.1.1",

Please i need help!!

@sammysmart95 sammysmart95 added the bug Something isn't working label Jan 28, 2022
@johnhaup
Copy link

Try restarting your metro bundler with yarn start --reset-cache

@brokenpieworld
Copy link

same error getting TypeError: undefined is not a function

@hugoh59
Copy link

hugoh59 commented Dec 15, 2022

Any solution here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants