Have not been able to resolve these two “Google Chrome”, console errors:
index.html:29 Uncaught ReferenceError: initializeApp is not defined
at index.html:29
auth.js:2 Uncaught ReferenceError: auth is not defined
at auth.js:2
Link to index.html and auth.js
ESP32/ESP8266: Firebase Web App to Display Sensor Readings (with Authentication)” is the tutorial I followed.
William
In.
In which step of the tutorial do you get the errors?
Did you create all the files and folders mentioned in the tutorial?
Regards,
Sara
Hi Sara,
Previous errors are resolved; no longer displayed in “Chrome” console. I had to change the version number for “Firebase” on all “script src” links. Running “Firebase –version” gives the version numbers.
Project folder I created is on the desktop, “Firebase-project.” Inside folder “public” are files: “index.html,” “404.html” and more… Inside of “public” another folder “scripts” are “auth.js” and “index.js.” I am getting “page not found.”
Path when I execute “Firebase init” is “C:\Users\username\Desktop\Firebase-project.” When prompted for a folder I use the “public” default. Once “Firebase deploy” is executed; result link produced is “page not found.”
Best Regards,
William
Hi William.
So, now you are getting the “page not found” error, is that correct?
How did you set up the Firebase project? Did you follow the instructions on the tutorial to create the Firebase default files using the commands on the Terminal window?
Regards,
Sara
Good Morning Sara,
Commands were entered in VScode; using VS code terminal.
Down to two errors.
auth.js:2 Uncaught ReferenceError: auth is not defined
at auth.js:2
weather-f819c.web.app/:1 Uncaught TypeError: Failed to resolve module specifier “firebase/app”. Relative references must start with either “/”, “./”, or “../”.
Files and file structure:
Directory of C:\Users\1234\Weather
12/18/2021 08:43 AM <DIR> .
12/18/2021 07:05 AM <DIR> ..
12/18/2021 01:18 AM <DIR> .firebase
12/18/2021 08:28 AM 146 .firebaserc
12/18/2021 12:39 AM 1,166 .gitignore
12/18/2021 01:07 AM <DIR> . vscode
12/16/2021 07:24 PM 212 database.rules.json
12/18/2021 08:28 AM 190 firebase.json
12/18/2021 08:43 AM <DIR> public
Directory of C:\Users\1234\Weather\public
12/18/2021 08:43 AM <DIR> .
12/18/2021 08:43 AM <DIR> ..
12/18/2021 06:51 AM 1,808 404.html
12/18/2021 08:26 AM 17,540 favicon.ico
12/18/2021 08:27 AM 3,927 index.html
12/18/2021 06:51 AM 1,252 style.css
Caught missing scripts folder; folder pah: “C:\users\1234\desktop\weather\public\scripts”.
Regards,
William