I am using the Firebase JS sdk for the web without any problems for a year now. After updating my code from the version 5.3.1
to use the latest 6.5.0
S
As explained in the doc (Tab "From the CDN"), importing firebase-app.js
only is not sufficient: you need, in addition, to import all the libraries of the Firebase products you want to use (Firebase Auth, Firestore, etc...).
So, in your case, you should do as follows:
<script src="https://www.gstatic.com/firebasejs/X.Y.Z/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/X.Y.Z/firebase-auth.js"></script>
where X.Y.Z
is the version number of the libraries, i.e. 6.6.1 at the time of writing.
Change this:
<script src="https://www.gstatic.com/firebasejs/6.5.0/firebase-app.js"></script>
to this:
<script src="https://www.gstatic.com/firebasejs/6.6.1/firebase.js"></script>