getting undefined is not a function (evaluating '(0,_reactNavigation.stacknavigator)') in drawer navigation












4














In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error




undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')




And installed this one too.



npm install react-navigation --save



But don't know why this error is coming, So please guide me how to resolve this.



This is my app.js



import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';

class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}

class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}

class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}

class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}

const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},

Screen2: {//Title
screen: Screen2_StackNavigator,
},

Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;

const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});


And this is package.json



{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}


If I follow bellow sample also getting same error.



https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba



enter image description here



Anybody can help please










share|improve this question
























  • How can we help without inspecting your code? So please be more elaborate on asking question.
    – Samitha Nanayakkara
    Nov 20 at 8:21










  • replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
    – Steve Nosse
    Nov 20 at 9:43


















4














In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error




undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')




And installed this one too.



npm install react-navigation --save



But don't know why this error is coming, So please guide me how to resolve this.



This is my app.js



import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';

class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}

class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}

class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}

class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}

const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},

Screen2: {//Title
screen: Screen2_StackNavigator,
},

Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;

const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});


And this is package.json



{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}


If I follow bellow sample also getting same error.



https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba



enter image description here



Anybody can help please










share|improve this question
























  • How can we help without inspecting your code? So please be more elaborate on asking question.
    – Samitha Nanayakkara
    Nov 20 at 8:21










  • replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
    – Steve Nosse
    Nov 20 at 9:43
















4












4








4







In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error




undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')




And installed this one too.



npm install react-navigation --save



But don't know why this error is coming, So please guide me how to resolve this.



This is my app.js



import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';

class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}

class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}

class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}

class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}

const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},

Screen2: {//Title
screen: Screen2_StackNavigator,
},

Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;

const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});


And this is package.json



{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}


If I follow bellow sample also getting same error.



https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba



enter image description here



Anybody can help please










share|improve this question















In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error




undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')




And installed this one too.



npm install react-navigation --save



But don't know why this error is coming, So please guide me how to resolve this.



This is my app.js



import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';

class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}

class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}

class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}

class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}

const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});

const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},

Screen2: {//Title
screen: Screen2_StackNavigator,
},

Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;

const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});


And this is package.json



{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}


If I follow bellow sample also getting same error.



https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba



enter image description here



Anybody can help please







react-native navigation-drawer stack-navigator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 14:25

























asked Nov 20 at 7:53









rams

51441229




51441229












  • How can we help without inspecting your code? So please be more elaborate on asking question.
    – Samitha Nanayakkara
    Nov 20 at 8:21










  • replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
    – Steve Nosse
    Nov 20 at 9:43




















  • How can we help without inspecting your code? So please be more elaborate on asking question.
    – Samitha Nanayakkara
    Nov 20 at 8:21










  • replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
    – Steve Nosse
    Nov 20 at 9:43


















How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21




How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21












replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43






replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43














6 Answers
6






active

oldest

votes


















4














Use createStackNavigator instead of stackNavigator.






share|improve this answer





























    0














    Replace this Code :



    import { createDrawerNavigator, createStackNavigator } from 'react-navigation';


    With this import of your project :



    import { DrawerNavigator, StackNavigator } from 'react-navigation';


    i hope this help you !






    share|improve this answer





















    • here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
      – rams
      Nov 20 at 14:07










    • check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
      – MoHammaD ReZa DehGhani
      Nov 20 at 14:10












    • not working getting undefined is not an object
      – rams
      Nov 20 at 14:19










    • ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
      – MoHammaD ReZa DehGhani
      Nov 20 at 14:22








    • 1




      check app.json file above
      – rams
      Nov 20 at 14:27



















    0














    This issue can be for haven't installed Android SDK platform 25 Do this :




    1. Open Android Studio

    2. Open SDK Manager

    3. Click SDK Platforms Tab

    4. Select android 7.1.1 (Nougat) API level is 25

    5. Apply


    After installing that press OK and try again to build the project.






    share|improve this answer





























      0














      you could have a look at this example code here:
      https://snack.expo.io/@eriveltonelias/stack-actions



      I think the problem is :




      1. with stackNavigator, you should use createStackNavigator
        (https://reactnavigation.org/docs/en/stack-navigator.html)
        and

      2. instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)






      share|improve this answer





























        0














        I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator as opposed to StackNavigator. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer.



        Now, instead of



        export default DrawerNavigatorExample;



        you need to have



        export default createAppContainer(DrawerNavigatorExample)



        Hope this saves someone else the hour I spent researching this :/



        link to docs






        share|improve this answer





























          0














          in package.json edit react-navigation to '^2.17.0' NEXT restart your pc






          share|improve this answer





















          • Can you explain how this wlll solve the problem?
            – Nick
            Dec 21 at 8:22










          • i try,and its works
            – Dzuhri Andika
            Dec 26 at 7:58










          • another solutions, downgrade react-navigation to version 2.17.0
            – Dzuhri Andika
            Dec 26 at 7:59











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388478%2fgetting-undefined-is-not-a-function-evaluating-0-reactnavigation-stacknaviga%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          Use createStackNavigator instead of stackNavigator.






          share|improve this answer


























            4














            Use createStackNavigator instead of stackNavigator.






            share|improve this answer
























              4












              4








              4






              Use createStackNavigator instead of stackNavigator.






              share|improve this answer












              Use createStackNavigator instead of stackNavigator.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 20 at 9:56









              Stundji

              420212




              420212

























                  0














                  Replace this Code :



                  import { createDrawerNavigator, createStackNavigator } from 'react-navigation';


                  With this import of your project :



                  import { DrawerNavigator, StackNavigator } from 'react-navigation';


                  i hope this help you !






                  share|improve this answer





















                  • here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                    – rams
                    Nov 20 at 14:07










                  • check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:10












                  • not working getting undefined is not an object
                    – rams
                    Nov 20 at 14:19










                  • ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:22








                  • 1




                    check app.json file above
                    – rams
                    Nov 20 at 14:27
















                  0














                  Replace this Code :



                  import { createDrawerNavigator, createStackNavigator } from 'react-navigation';


                  With this import of your project :



                  import { DrawerNavigator, StackNavigator } from 'react-navigation';


                  i hope this help you !






                  share|improve this answer





















                  • here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                    – rams
                    Nov 20 at 14:07










                  • check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:10












                  • not working getting undefined is not an object
                    – rams
                    Nov 20 at 14:19










                  • ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:22








                  • 1




                    check app.json file above
                    – rams
                    Nov 20 at 14:27














                  0












                  0








                  0






                  Replace this Code :



                  import { createDrawerNavigator, createStackNavigator } from 'react-navigation';


                  With this import of your project :



                  import { DrawerNavigator, StackNavigator } from 'react-navigation';


                  i hope this help you !






                  share|improve this answer












                  Replace this Code :



                  import { createDrawerNavigator, createStackNavigator } from 'react-navigation';


                  With this import of your project :



                  import { DrawerNavigator, StackNavigator } from 'react-navigation';


                  i hope this help you !







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 20 at 14:00









                  MoHammaD ReZa DehGhani

                  112115




                  112115












                  • here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                    – rams
                    Nov 20 at 14:07










                  • check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:10












                  • not working getting undefined is not an object
                    – rams
                    Nov 20 at 14:19










                  • ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:22








                  • 1




                    check app.json file above
                    – rams
                    Nov 20 at 14:27


















                  • here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                    – rams
                    Nov 20 at 14:07










                  • check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:10












                  • not working getting undefined is not an object
                    – rams
                    Nov 20 at 14:19










                  • ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                    – MoHammaD ReZa DehGhani
                    Nov 20 at 14:22








                  • 1




                    check app.json file above
                    – rams
                    Nov 20 at 14:27
















                  here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                  – rams
                  Nov 20 at 14:07




                  here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
                  – rams
                  Nov 20 at 14:07












                  check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                  – MoHammaD ReZa DehGhani
                  Nov 20 at 14:10






                  check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
                  – MoHammaD ReZa DehGhani
                  Nov 20 at 14:10














                  not working getting undefined is not an object
                  – rams
                  Nov 20 at 14:19




                  not working getting undefined is not an object
                  – rams
                  Nov 20 at 14:19












                  ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                  – MoHammaD ReZa DehGhani
                  Nov 20 at 14:22






                  ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
                  – MoHammaD ReZa DehGhani
                  Nov 20 at 14:22






                  1




                  1




                  check app.json file above
                  – rams
                  Nov 20 at 14:27




                  check app.json file above
                  – rams
                  Nov 20 at 14:27











                  0














                  This issue can be for haven't installed Android SDK platform 25 Do this :




                  1. Open Android Studio

                  2. Open SDK Manager

                  3. Click SDK Platforms Tab

                  4. Select android 7.1.1 (Nougat) API level is 25

                  5. Apply


                  After installing that press OK and try again to build the project.






                  share|improve this answer


























                    0














                    This issue can be for haven't installed Android SDK platform 25 Do this :




                    1. Open Android Studio

                    2. Open SDK Manager

                    3. Click SDK Platforms Tab

                    4. Select android 7.1.1 (Nougat) API level is 25

                    5. Apply


                    After installing that press OK and try again to build the project.






                    share|improve this answer
























                      0












                      0








                      0






                      This issue can be for haven't installed Android SDK platform 25 Do this :




                      1. Open Android Studio

                      2. Open SDK Manager

                      3. Click SDK Platforms Tab

                      4. Select android 7.1.1 (Nougat) API level is 25

                      5. Apply


                      After installing that press OK and try again to build the project.






                      share|improve this answer












                      This issue can be for haven't installed Android SDK platform 25 Do this :




                      1. Open Android Studio

                      2. Open SDK Manager

                      3. Click SDK Platforms Tab

                      4. Select android 7.1.1 (Nougat) API level is 25

                      5. Apply


                      After installing that press OK and try again to build the project.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 21 at 8:01









                      MoHammaD ReZa DehGhani

                      112115




                      112115























                          0














                          you could have a look at this example code here:
                          https://snack.expo.io/@eriveltonelias/stack-actions



                          I think the problem is :




                          1. with stackNavigator, you should use createStackNavigator
                            (https://reactnavigation.org/docs/en/stack-navigator.html)
                            and

                          2. instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)






                          share|improve this answer


























                            0














                            you could have a look at this example code here:
                            https://snack.expo.io/@eriveltonelias/stack-actions



                            I think the problem is :




                            1. with stackNavigator, you should use createStackNavigator
                              (https://reactnavigation.org/docs/en/stack-navigator.html)
                              and

                            2. instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)






                            share|improve this answer
























                              0












                              0








                              0






                              you could have a look at this example code here:
                              https://snack.expo.io/@eriveltonelias/stack-actions



                              I think the problem is :




                              1. with stackNavigator, you should use createStackNavigator
                                (https://reactnavigation.org/docs/en/stack-navigator.html)
                                and

                              2. instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)






                              share|improve this answer












                              you could have a look at this example code here:
                              https://snack.expo.io/@eriveltonelias/stack-actions



                              I think the problem is :




                              1. with stackNavigator, you should use createStackNavigator
                                (https://reactnavigation.org/docs/en/stack-navigator.html)
                                and

                              2. instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Nov 22 at 7:50









                              Der_D

                              517




                              517























                                  0














                                  I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator as opposed to StackNavigator. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer.



                                  Now, instead of



                                  export default DrawerNavigatorExample;



                                  you need to have



                                  export default createAppContainer(DrawerNavigatorExample)



                                  Hope this saves someone else the hour I spent researching this :/



                                  link to docs






                                  share|improve this answer


























                                    0














                                    I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator as opposed to StackNavigator. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer.



                                    Now, instead of



                                    export default DrawerNavigatorExample;



                                    you need to have



                                    export default createAppContainer(DrawerNavigatorExample)



                                    Hope this saves someone else the hour I spent researching this :/



                                    link to docs






                                    share|improve this answer
























                                      0












                                      0








                                      0






                                      I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator as opposed to StackNavigator. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer.



                                      Now, instead of



                                      export default DrawerNavigatorExample;



                                      you need to have



                                      export default createAppContainer(DrawerNavigatorExample)



                                      Hope this saves someone else the hour I spent researching this :/



                                      link to docs






                                      share|improve this answer












                                      I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator as opposed to StackNavigator. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer.



                                      Now, instead of



                                      export default DrawerNavigatorExample;



                                      you need to have



                                      export default createAppContainer(DrawerNavigatorExample)



                                      Hope this saves someone else the hour I spent researching this :/



                                      link to docs







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Dec 3 at 20:09









                                      gwalshington

                                      9821726




                                      9821726























                                          0














                                          in package.json edit react-navigation to '^2.17.0' NEXT restart your pc






                                          share|improve this answer





















                                          • Can you explain how this wlll solve the problem?
                                            – Nick
                                            Dec 21 at 8:22










                                          • i try,and its works
                                            – Dzuhri Andika
                                            Dec 26 at 7:58










                                          • another solutions, downgrade react-navigation to version 2.17.0
                                            – Dzuhri Andika
                                            Dec 26 at 7:59
















                                          0














                                          in package.json edit react-navigation to '^2.17.0' NEXT restart your pc






                                          share|improve this answer





















                                          • Can you explain how this wlll solve the problem?
                                            – Nick
                                            Dec 21 at 8:22










                                          • i try,and its works
                                            – Dzuhri Andika
                                            Dec 26 at 7:58










                                          • another solutions, downgrade react-navigation to version 2.17.0
                                            – Dzuhri Andika
                                            Dec 26 at 7:59














                                          0












                                          0








                                          0






                                          in package.json edit react-navigation to '^2.17.0' NEXT restart your pc






                                          share|improve this answer












                                          in package.json edit react-navigation to '^2.17.0' NEXT restart your pc







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Dec 21 at 8:04









                                          Dzuhri Andika

                                          1




                                          1












                                          • Can you explain how this wlll solve the problem?
                                            – Nick
                                            Dec 21 at 8:22










                                          • i try,and its works
                                            – Dzuhri Andika
                                            Dec 26 at 7:58










                                          • another solutions, downgrade react-navigation to version 2.17.0
                                            – Dzuhri Andika
                                            Dec 26 at 7:59


















                                          • Can you explain how this wlll solve the problem?
                                            – Nick
                                            Dec 21 at 8:22










                                          • i try,and its works
                                            – Dzuhri Andika
                                            Dec 26 at 7:58










                                          • another solutions, downgrade react-navigation to version 2.17.0
                                            – Dzuhri Andika
                                            Dec 26 at 7:59
















                                          Can you explain how this wlll solve the problem?
                                          – Nick
                                          Dec 21 at 8:22




                                          Can you explain how this wlll solve the problem?
                                          – Nick
                                          Dec 21 at 8:22












                                          i try,and its works
                                          – Dzuhri Andika
                                          Dec 26 at 7:58




                                          i try,and its works
                                          – Dzuhri Andika
                                          Dec 26 at 7:58












                                          another solutions, downgrade react-navigation to version 2.17.0
                                          – Dzuhri Andika
                                          Dec 26 at 7:59




                                          another solutions, downgrade react-navigation to version 2.17.0
                                          – Dzuhri Andika
                                          Dec 26 at 7:59


















                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Stack Overflow!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.





                                          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                          Please pay close attention to the following guidance:


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388478%2fgetting-undefined-is-not-a-function-evaluating-0-reactnavigation-stacknaviga%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                                          Alcedinidae

                                          Can an atomic nucleus contain both particles and antiparticles? [duplicate]