React Native Firebase TypeError when importing












1















I am developing an Android and IOS mobile app using React Native. I want to use Firebase for my database but when I install npm install --save firebase and then I import firebase from 'firebase'.



I would get this error saying




"TypeError: undefined is not a function(evaluating '_iteratortypeof
Symbol === "function" ? Symbol.iterator: "@@iterator"')"




This is the screenshot of my output



enter image description here



I want to create a login screen for my app with a database. Any other suggestion can help if using Firebase for my mobile app.



This is my coding if it helps.



import React from 'react';
import {
View,
Text,
StyleSheet,
Platform,
TextInput,
TouchableOpacity,
} from 'react-native';
import firebase from 'firebase';


export default class Login extends React.Component {

constructor(props) {
super(props);
}
state = {
email: "Enter email",
password: "Enter password"
};





render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text style={styles.text}>Create an account below</Text>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ email: text })}
value={this.state.email}
/>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ password: text })}
value={this.state.password}
/>
<TouchableOpacity

>
<View>
<Text>Log In Existing</Text>
</View>
</TouchableOpacity>

<TouchableOpacity

>
<View>
<Text>Create New User</Text>
</View>
</TouchableOpacity>
</View>
</View>
);
}}









share|improve this question

























  • Outra here the content oficial your file that have the import...

    – Sergio Clemente
    Nov 23 '18 at 2:21
















1















I am developing an Android and IOS mobile app using React Native. I want to use Firebase for my database but when I install npm install --save firebase and then I import firebase from 'firebase'.



I would get this error saying




"TypeError: undefined is not a function(evaluating '_iteratortypeof
Symbol === "function" ? Symbol.iterator: "@@iterator"')"




This is the screenshot of my output



enter image description here



I want to create a login screen for my app with a database. Any other suggestion can help if using Firebase for my mobile app.



This is my coding if it helps.



import React from 'react';
import {
View,
Text,
StyleSheet,
Platform,
TextInput,
TouchableOpacity,
} from 'react-native';
import firebase from 'firebase';


export default class Login extends React.Component {

constructor(props) {
super(props);
}
state = {
email: "Enter email",
password: "Enter password"
};





render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text style={styles.text}>Create an account below</Text>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ email: text })}
value={this.state.email}
/>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ password: text })}
value={this.state.password}
/>
<TouchableOpacity

>
<View>
<Text>Log In Existing</Text>
</View>
</TouchableOpacity>

<TouchableOpacity

>
<View>
<Text>Create New User</Text>
</View>
</TouchableOpacity>
</View>
</View>
);
}}









share|improve this question

























  • Outra here the content oficial your file that have the import...

    – Sergio Clemente
    Nov 23 '18 at 2:21














1












1








1








I am developing an Android and IOS mobile app using React Native. I want to use Firebase for my database but when I install npm install --save firebase and then I import firebase from 'firebase'.



I would get this error saying




"TypeError: undefined is not a function(evaluating '_iteratortypeof
Symbol === "function" ? Symbol.iterator: "@@iterator"')"




This is the screenshot of my output



enter image description here



I want to create a login screen for my app with a database. Any other suggestion can help if using Firebase for my mobile app.



This is my coding if it helps.



import React from 'react';
import {
View,
Text,
StyleSheet,
Platform,
TextInput,
TouchableOpacity,
} from 'react-native';
import firebase from 'firebase';


export default class Login extends React.Component {

constructor(props) {
super(props);
}
state = {
email: "Enter email",
password: "Enter password"
};





render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text style={styles.text}>Create an account below</Text>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ email: text })}
value={this.state.email}
/>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ password: text })}
value={this.state.password}
/>
<TouchableOpacity

>
<View>
<Text>Log In Existing</Text>
</View>
</TouchableOpacity>

<TouchableOpacity

>
<View>
<Text>Create New User</Text>
</View>
</TouchableOpacity>
</View>
</View>
);
}}









share|improve this question
















I am developing an Android and IOS mobile app using React Native. I want to use Firebase for my database but when I install npm install --save firebase and then I import firebase from 'firebase'.



I would get this error saying




"TypeError: undefined is not a function(evaluating '_iteratortypeof
Symbol === "function" ? Symbol.iterator: "@@iterator"')"




This is the screenshot of my output



enter image description here



I want to create a login screen for my app with a database. Any other suggestion can help if using Firebase for my mobile app.



This is my coding if it helps.



import React from 'react';
import {
View,
Text,
StyleSheet,
Platform,
TextInput,
TouchableOpacity,
} from 'react-native';
import firebase from 'firebase';


export default class Login extends React.Component {

constructor(props) {
super(props);
}
state = {
email: "Enter email",
password: "Enter password"
};





render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text style={styles.text}>Create an account below</Text>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ email: text })}
value={this.state.email}
/>
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({ password: text })}
value={this.state.password}
/>
<TouchableOpacity

>
<View>
<Text>Log In Existing</Text>
</View>
</TouchableOpacity>

<TouchableOpacity

>
<View>
<Text>Create New User</Text>
</View>
</TouchableOpacity>
</View>
</View>
);
}}






firebase react-native






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 3:06







khai khai

















asked Nov 23 '18 at 1:40









khai khaikhai khai

154




154













  • Outra here the content oficial your file that have the import...

    – Sergio Clemente
    Nov 23 '18 at 2:21



















  • Outra here the content oficial your file that have the import...

    – Sergio Clemente
    Nov 23 '18 at 2:21

















Outra here the content oficial your file that have the import...

– Sergio Clemente
Nov 23 '18 at 2:21





Outra here the content oficial your file that have the import...

– Sergio Clemente
Nov 23 '18 at 2:21












1 Answer
1






active

oldest

votes


















0














which babel version is used for compilation? all the babel plugin and preset should match of babel version.
Please check the babel version and presets.






share|improve this answer
























  • How do I check the babel plugin and preset version?

    – khai khai
    Nov 23 '18 at 4:28











  • please check in package.json file

    – Sabin Maharjan
    Nov 23 '18 at 7:06











  • Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

    – khai khai
    Nov 23 '18 at 8:01











  • you have to require core-js. you can find the solution here

    – Sabin Maharjan
    Nov 23 '18 at 10:01













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%2f53439729%2freact-native-firebase-typeerror-when-importing%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














which babel version is used for compilation? all the babel plugin and preset should match of babel version.
Please check the babel version and presets.






share|improve this answer
























  • How do I check the babel plugin and preset version?

    – khai khai
    Nov 23 '18 at 4:28











  • please check in package.json file

    – Sabin Maharjan
    Nov 23 '18 at 7:06











  • Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

    – khai khai
    Nov 23 '18 at 8:01











  • you have to require core-js. you can find the solution here

    – Sabin Maharjan
    Nov 23 '18 at 10:01


















0














which babel version is used for compilation? all the babel plugin and preset should match of babel version.
Please check the babel version and presets.






share|improve this answer
























  • How do I check the babel plugin and preset version?

    – khai khai
    Nov 23 '18 at 4:28











  • please check in package.json file

    – Sabin Maharjan
    Nov 23 '18 at 7:06











  • Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

    – khai khai
    Nov 23 '18 at 8:01











  • you have to require core-js. you can find the solution here

    – Sabin Maharjan
    Nov 23 '18 at 10:01
















0












0








0







which babel version is used for compilation? all the babel plugin and preset should match of babel version.
Please check the babel version and presets.






share|improve this answer













which babel version is used for compilation? all the babel plugin and preset should match of babel version.
Please check the babel version and presets.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 23 '18 at 3:13









Sabin MaharjanSabin Maharjan

1




1













  • How do I check the babel plugin and preset version?

    – khai khai
    Nov 23 '18 at 4:28











  • please check in package.json file

    – Sabin Maharjan
    Nov 23 '18 at 7:06











  • Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

    – khai khai
    Nov 23 '18 at 8:01











  • you have to require core-js. you can find the solution here

    – Sabin Maharjan
    Nov 23 '18 at 10:01





















  • How do I check the babel plugin and preset version?

    – khai khai
    Nov 23 '18 at 4:28











  • please check in package.json file

    – Sabin Maharjan
    Nov 23 '18 at 7:06











  • Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

    – khai khai
    Nov 23 '18 at 8:01











  • you have to require core-js. you can find the solution here

    – Sabin Maharjan
    Nov 23 '18 at 10:01



















How do I check the babel plugin and preset version?

– khai khai
Nov 23 '18 at 4:28





How do I check the babel plugin and preset version?

– khai khai
Nov 23 '18 at 4:28













please check in package.json file

– Sabin Maharjan
Nov 23 '18 at 7:06





please check in package.json file

– Sabin Maharjan
Nov 23 '18 at 7:06













Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

– khai khai
Nov 23 '18 at 8:01





Im using this "dependencies": { "firebase": "^5.5.9", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.3", }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.1", "react-test-renderer": "16.6.0-alpha.8af6728"

– khai khai
Nov 23 '18 at 8:01













you have to require core-js. you can find the solution here

– Sabin Maharjan
Nov 23 '18 at 10:01







you have to require core-js. you can find the solution here

– Sabin Maharjan
Nov 23 '18 at 10:01




















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53439729%2freact-native-firebase-typeerror-when-importing%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

Wiesbaden

Marschland

Dieringhausen