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

TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[31], "react-navigation-tabs").createMaterialTopTabNavigator') #3815

Open
linweiboy opened this issue Mar 8, 2022 · 4 comments

Comments

@linweiboy
Copy link

Version

Tell us which versions you are using:

I am using yarn install my package.json

  • react-native-router-flux 4.3.1
  • react v17.0.2
  • react-native v0.67.3

At first, I wrote TabBar by myself through React-native router-Flux, and then I found this problem:
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[31], "react-navigation-tabs").createMaterialTopTabNavigator')

Later, when I wrote TabBar according to the official Demo, this problem still appeared.

const Routers = () => (



<Stack key="root" titleStyle={{alignSelf: 'center'}} hideNavBar>

<Tabs
key="tabbar"
routeName="tabbar"
backToInitial
onTabOnPress={() => {
console.log('Back to initial and also print this');
}}
showLabel={false}
tabBarStyle={styles.tabBarStyle}
activeBackgroundColor="white"
inactiveBackgroundColor="rgba(255, 0, 0, 0.5)">
<Stack
key="tab_1"
title="Tab #1"
tabBarLabel="TAB #1"
inactiveBackgroundColor="#FFF"
activeBackgroundColor="#DDD"
icon={TabIcon}
navigationBarStyle={{backgroundColor: 'green'}}
titleStyle={{color: 'white', alignSelf: 'center'}}>
<Scene
key="tab_1_1"
component={TabView}
title="Tab #1_1"
onRight={() => alert('Right button')}
rightTitle="Right"
/>

            <Scene
              key="tab_1_2"
              component={TabView}
              title="Tab #1_2"
              back
              titleStyle={{color: 'black', alignSelf: 'center'}}
            />
          </Stack>
          <Stack key="tab_2" title="Tab #2" icon={TabIcon} initial>
            <Scene
              key="tab_2_1"
              component={TabView}
              title="Tab #2_1"
              renderRightButton={() => <Text>Right</Text>}
            />
            <Scene
              key="tab_2_2"
              component={TabView}
              title="Tab #2_2"
              back
              onBack={() => alert('onBack button!')}
              hideDrawerButton
              backTitle="Back!"
              panHandlers={null}
            />
          </Stack>
        </Tabs>
      </Scene>
    </Stack>
  </Lightbox>
</Modal>
@NagavikasPulluri
Copy link

what is the react-navigation version you are using?

@Manikanta-GEP
Copy link

@NagavikasPulluri 4.4.4

@hsnMoghadasi
Copy link

+1

@hsnMoghadasi
Copy link

I fix this bug by downgrading this package :

"react-native-reanimated": "^1.7.1",
"react-native-gesture-handler": "^1.6.1",
"react-native-router-flux": "^4.2.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants