当我运行 exp start 命令时出现此错误。我该如何解决这个错误?
这是我的 login.js
文件代码。
我是 React Native 的新手,使用 js 使用 expo 运行 native 应用程序,所以我陷入了困境。我不知道为什么它会给我这个错误以及如何处理它。
import React, { Component } from 'react';
import {
Alert,
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
Image,
AsyncStorage,
KeyboardAvoidingView,
Dimensions,
ActivityIndicator,
NetInfo,
BackHandler,
DeviceEventEmitter
} from 'react-native';
import * as firebase from 'firebase';
import firebaseService from '../config/firebaseService';
import {Actions} from 'react-native-router-flux';
import Modal from "react-native-modal";
import { Dialog,ConfirmDialog } from 'react-native-simple-dialogs';
import Toast, {DURATION} from 'react-native-easy-toast';
import Expo from 'expo';
var height = Dimensions.get('window').height;
var width = Dimensions.get('window').width;
import styles from "../styles/loginStyle";
import {apiUrl,netErrorMsg,facebookId,androidGoogleClientId,iosGoogleClientId,firebaseConfig} from "../config/constant";
export default class Login extends Component<{}> {
constructor(props) {
super(props);
this.state = {
email:'',
password:'',
forgotEmail:'',
versionName:'',
loading:false,
isModalVisible: false,
netStatus:'none',
dialogVisible:false,
errorForgotEmail:""
}
}
最佳答案
看起来您正在尝试从某个文件中的 Login.js
导入 firebase
。删除该导入并导入 firebase,因为您已将其导入到 Login.js
中。这将解决问题。
关于node.js - 无法从 "firebase"解析 "src\containers\Login.js",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54017755/