Question: I'm creating a social app and I got this error. What should I do?

This is my config file:

```
import * as firebase from "firebase/app";

const FirebaseKey = { 

   apiKey: "****",
   authDomain: "****",
   databaseURL: "****",
   projectId: "****", 
   storageBucket: "****",
   messagingSenderId: "****", 
   appId: "****" 

};

export default !firebase.apps.length ? firebase.initializeApp(FirebaseKey) : firebase.app();

```

And this is my Fire.js file's beginning (here is the mistake):

```
import FirebaseKeys from "./Config";
import firebase from "./App";
require("firebase/firestore");

class Fire {
    constructor() {
        firebase.initializeApp(FirebaseKeys);
    }

```

Answer: 
In firebase 8.0.0 and above it is

```
import firebase from 'firebase'

```

and for firebase <8.0.0

it is

```
import * as firebase from 'firebase'

```
Firebase 8 introduced some breaking changes.

<https://firebase.google.com/support/release-notes/js#version_800_-_october_26_2020>

Now you can make it work like this if you use **.default**:

```
const firebase = require('firebase/app').default

if (!firebase.apps.length) {
    firebase.initializeApp(firebaseConfig)
}

```