• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Firebase WebApp ebook chapter 4.3 creating local host fails

Q&A Forum › Category: Home Automation › Firebase WebApp ebook chapter 4.3 creating local host fails
0 Vote Up Vote Down
Michael Reisch asked 6 months ago

I´m working at the Firebase Web App course and when I try to build the Firebase Web App locally as described in chapter 4.3 then I get the following error message:
PS C:\DevelopIO\firebase-projects\FB_Send_DHT_Data> firebase serve –only hosting
(node:1844) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node –trace-deprecation …` to show where the warning was created)
i hosting[esp-iot-app-86585]: Serving hosting files from: public
+ hosting[esp-iot-app-86585]: Local server: http://localhost:5000

 

when I try to run the local server http://localhost:5000 I get an “Unexpected Error occurs” and an additional message in the terminal window:

TypeError: Cannot read properties of undefined (reading ‘getTime’)
at Responder.provider (C:\Users\Acer Spin\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\superstatic\lib\providers\fs.js:89:38)
at async Promise.all (index 0)
i hosting: ::1 – – [10/Nov/2024:13:25:45 +0000] “GET / HTTP/1.1” 500 – “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0”

I will be very happy if anyone can help me with that issue.
Thanks a lot
Michael

Question Tags: ESP32, Firebase Web App
12 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Hi.
 
The first error means that the punycode module is deprecated in newer Node.js versions, which Firebase CLI might still use internally. There’s nothing we can do about it. Firebase must update to use the newer version.
However, that particular warning won’t prevent Firebase from running; it’s just a notice about potential future compatibility issues. So, you can ignore that.
Note that you’ll get that warning every time you run a Firebase command until the Firebase software fixes that issue.
__________________________
As for the other error, after searching for a while, it seems to be an incompatibility with Firebase and the newest version of NodeJS: https://github.com/firebase/firebase-tools/issues/7173
 
The workaround for this issue is to fix the error on the file.
On your computer, go to the following path

C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\superstatic\lib\providers\

 
Open the fs.js file on VS Code or another text editing program.
Go to line 89.
Replace the following:

modified: stat.mtime.getTime(),

With:

modified: stat.mtimeMs,

Save the file and close it.
 
Try to run the command again:

firebase serve --only hosting

 
I tried this workaround and it worked for me.
 
Let me know if you can do it.
 
I’m sorry for the issues, but there’s nothing we can do about them as these are related to NodeJS and Firebase software, which is out of out of our control. We can do those workarounds an wait for NodeJS or Firebase to fix the issues on their end.
 
Regards,
Sara
 
 
 
 

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

Hello Sara,
thank you very much for your help, it works now!
But now I have another issue – it seems that the bootstrap css did not work. I see the webpage unformatted.
<I want to send here a Screeshot, but I can not find out how I can upload it>
Do you have an idea what Im doing wrong?
 
Your courses are the best, this is my third Random Nerd course I do and I learn a lot. Thank so much for that.
Best regards
Michael

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

BTW – my daughters name is also Sara. 

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Hi.
What a coincidence 😀
 
To share a picture, please upload it to google drive, dropbox, or imgur, and then send me a link to the file.
 
Regards,
 
Sara

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

Hello Sara,
here is the screenshot: https://drive.google.com/file/d/1QsuyWUFiswCnDl4SZMBKDgdbpkKHM9bE/view?usp=drive_link
best regards
Michael

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

Hello Sara,
I found the problem: I have a new version of bootstrap 5.3.3, I have changed the version number in the link, but I didn´t change the integrity value. I load the new link command from bootstrap homepage:

<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css&#8221; rel=”stylesheet” integrity=”sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH” crossorigin=”anonymous”>

 
This works now!
 
Best regards
Michael

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

Hello Sara,
when I click on the Login Button nothing happens. The browser console show following errors:
https://drive.google.com/file/d/1uRlRI9r9oiLEi1ECROqDzxLvd2J5bCb2/view?usp=drive_link
Hope you have an idea where is my fault.
Thanks a lot, regards
Michael

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

At what page of the eBook are you at?

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

I´m at page 139/140

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

At that point, that’s perfectly normal.
As we mention in the eBook
“You can click on the Login button, and a new window will pop up to enter an email
address and a password. At the moment, it isn’t working yet.”
 
“We’ll add some code to our JavaScript files, and everything will start working. We’ve
only prepared the UI so far.”

0 Vote Up Vote Down
Michael Reisch answered 6 months ago

Hello Sara,
oh sorry, I thought you mean the login didn´t work ….
Thanks for your help.
Best regards
Michael

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Great.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.