title: Firebase is already defined in the global scope. Please make sure Firebase library is only loaded once
body: <p>I am getting this alert 2 times in the console, I check the network and when loading the home, it registers two identical events, indicated in the image, the only difference between one and the other is the versions, which one is 6.6.1 that It is the one I currently have, and 7.15.4 (Which I do not have installed in my project, nor do I have any configuration with it, I looked for it in the whole project, and it is neither in package.json nor in the lock.json, absolutely nothing about that version, I want you to stop showing me that warning and not that.</p>
  <p><a href="https://i.stack.imgur.com/jc6KK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jc6KK.png" alt="enter image description here" /></a></p>
  <p>The only settings that I have that call the firebase are this file</p>
  <pre><code>importScripts('https://www.gstatic.com/firebasejs/6.6.1/firebase-app.js');
  importScripts('https://www.gstatic.com/firebasejs/6.6.1/firebase-messaging.js');
  
  firebase.initializeApp({
  messagingSenderId: &quot;xxxxxxxxxxx&quot;
  });
  
  const messaging = firebase.messaging();
  
  console.log('Handling background message')
  messaging.setBackgroundMessageHandler(function(payload) {
   console.log('Handling background message ', payload);
  
   return self.registration.showNotification(payload.data.title, {
      body: payload.data.body,
      icon: payload.data.icon,
      data: {
          click: payload.data.click,
          userId: payload.data.userId,
          pushId: payload.data.pushId,
      }
  });
  });
  
  self.addEventListener('notificationclick', function(event) {
  event.notification.close();
  event.waitUntil(self.clients.openWindow(event.notification.data.click));
  })
  </code></pre>
  <p>And this one, which is in the index.html</p>
  <pre><code>&lt;script src=&quot;https://www.gstatic.com/firebasejs/6.6.1/firebase-app.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;https://www.gstatic.com/firebasejs/6.6.1/firebase-messaging.js&quot;&gt;&lt;/script&gt;  
  &lt;script&gt;
      try {
          window
              .firebase
              .initializeApp({
                  apiKey: &quot;%REACT_APP_FIREBASE_ANALYTICS_API_KEY%&quot;,
                  authDomain: &quot;%REACT_APP_FIREBASE_ANALYTICS_AUTH_DOMAIN%&quot;,
                  databaseURL: &quot;%REACT_APP_FIREBASE_ANALYTICS_DATABASE_URL%&quot;,
                  projectId: &quot;%REACT_APP_FIREBASE_ANALYTICS_PROJECT_ID%&quot;,
                  storageBucket: &quot;%REACT_APP_FIREBASE_ANALYTICS_STORAGE_BUCKER%&quot;,
                  messagingSenderId: &quot;%REACT_APP_FIREBASE_ANALYTICS_MESSAGING_SENDER_ID%&quot;,
                  appId: &quot;%REACT_APP_FIREBASE_ANALYTICS_APP_ID%&quot;,
                  measurementId: &quot;%REACT_APP_FIREBASE_ANALYTICS_MEASUREMENT_ID%&quot;
              })
      } catch (e) {
          console.error(e)
      }
  &lt;/script&gt;
  </code></pre>