I am trying to get the code output to show without any errors, but every time I run this code I get an error stating the "iOS Bundling failed. While trying to resolve module firebase from file C:\Internship\src\App.js, the package C:\Internship\node_modules\firebase\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\Internship\node_modules\firebase\index. Indeed, none of these files exist:
//Importing Libraries to create App
import React, {Component} from 'react';
import { View } from 'react-native';
import firebase from 'firebase';
import {Header} from './components/common';
import LoginForm from './components/LoginForm';
//Creating App class
class App extends Component{
//Initalizing Firebase
componentWillMount(){
firebase.initializeApp({
apiKey: 'AIzaSyDaAOmCb2Agiu7JRLlOUG0Mv7O4VxH-Od8',
authDomain: 'oakpark-service-app.firebaseapp.com',
projectId: 'oakpark-service-app',
storageBucket: 'oakpark-service-app.appspot.com',
messagingSenderId: '662166215544',
appId: '1:662166215544:web:e433baacc7d1a9c219068d',
measurementId: 'G-PZ6LLVFNFD'
});
}
render(){
return(
<View>
<Header headerText="Login/Sign Up" />
<LoginForm />
</View>
);
}
}
//Exporting App class to use in different files
export default App;
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>