1

Firebase Hosting Setup Complete, Error loading the Firebase SDK,check the console.

Got "Error loading the Firebase SDK, check the console." message after successful deployment from Firebase. Read in another post that clearing the cache may help. However this did not turn out to be a solution for me. This error has occurred with multiple projects including blank ones. Tried uninstalling and reinstalling Firebase. These are angular projects so I also tried uninstalling angular and angular/fire and reinstalling them both. I am currently using Linux mint Ubuntu. This is my first angular and Firebase project so excuse me if the answer is in front of me.

Ruben Mendoza
  • 11
  • 1
  • 2
  • I had this problem. first i forced it with "/index.html" and it worked then tried to figure out the problem. in conclusion, i think we just had to wait a long time. – elgsylvain85 Oct 19 '21 at 22:47

3 Answers3

0

Cannot upgrade or remove firebase from system

trying uninstalling firebase with the first two commands in this post. which firebase then rm /usr/local/bin/firebase

then reinstall with: curl -sL https://firebase.tools | bash or npm install -g firebase-tools

curl worked for me. hope this helps someone in the future because i just wasted three hours trying to fix it :')

Max Rush
  • 41
  • 4
0

For me, it turns out that firebase is shipped by modules by default. To use the old regular javascript import, you can add -compat to the end of the javascript files like so:

<!-- update the version number as needed -->
    <script defer src="/__/firebase/9.14.0/firebase-app-compat.js"></script>
    <!-- include only the Firebase features as you need -->
    <script defer src="/__/firebase/9.14.0/firebase-analytics-compat.js"></script>
    <script defer src="/__/firebase/9.14.0/firebase-remote-config-compat.js"></script>
    <script defer src="/__/firebase/9.14.0/firebase-performance-compat.js"></script>
Lexon Li
  • 135
  • 1
  • 5
0

I was getting this command when I served the project using

serve public

command. But when I used Firebase Serve command, the issue got resolved. SDK was correctly loaded

firebase serve --only hosting --port=5002

Youtube Tutorial

TheTechGuy
  • 16,560
  • 16
  • 115
  • 136