title: Server Error TypeError: Cannot read properties of undefined (reading 'apps')
body: <p>this is my firebase sdk version</p>
  <pre><code>firebase@9.0.2
  
  </code></pre>
  <p>this is init code of firebase  i cant solve this please help me for this error</p>
  <pre><code>
  
  
  export default function  initFirebase() {
      if(!firebase.apps.length){
          firebase.initializeApp(clientCredentials)
  
          if(typeof window !=='undefined'){
              if('measurementId' in clientCredentials){
                  firebase.analytics()
                  firebase.performance()
              }
          }
          console.log('firebase was successfully init')
      }
  }
  
  </code></pre>
  <p>How i import firebase</p>
  <pre><code>import firebase from 'firebase/app'
  
  import 'firebase/firestore'
  import 'firebase/storage'
  import 'firebase/analytics'
  import 'firebase/performance'
  </code></pre>