• 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

‘PUNYCODE’ Deprecation | Firebase Web App Book page 127

Q&A Forum › Category: Questions › ‘PUNYCODE’ Deprecation | Firebase Web App Book page 127
0 Vote Up Vote Down
ArgusTuft asked 4 months ago

Good Morning Team,
I’ve faithfully worked through this quite excellent manual, it’s a splendid example of how a professional guide should be presented.  And I particularly appreciate that you use VSC.
Until alas, at page 127 after running ‘firebase deploy‘ I hit the dreaded “The `punycode` module is deprecated. Please use a userland alternative instead“
System Versions
Firebase 13.29.2
Python v3.13.1
npm 11.0.0
Node.js v22.13.1

Normally I can work through this type of problem but I, and judging by the thousands of kilometres of often conflicting advice relating to it on the web, a large number of others have the same issue across a variety of platforms.
Are you able to offer a Guide for Idiots that will help me proceed please.
Thanks and best wishes
Argus

Question Tags: Deprecated PUNYCODE / Firebase
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 months ago

Hi.
I found this discussion with the same issue: https://stackoverflow.com/questions/77904330/punycode-firebase
Can you try the proposed solution and let me know if that fixes the problem?
Regards,
Sara

0 Vote Up Vote Down
ArgusTuft answered 4 months ago

Hello Sara.
Sadly, no.
It’s one of 30+ links I’ve worked through, thus far unsuccessfully.
I’m continuing the search and will keep you posted.
Cheers
Argus
 

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

Hi.
I just tested the commands and I also get that warning.
That is not an error. It is just a warning. The codes are still working as expected and you should get the URL for the web app after deploying the project. I tested it and it is working.
 
That issue is related to a version of NodeJS. Firebase Tools will need to be updated (but that’s something that we can’t control). However, everything is still working despite the warning.
 
Regards,
Sara

0 Vote Up Vote Down
ArgusTuft answered 4 months ago

Sorry Sara, in my case the system actually threw the deprecation warning then exited without finalising.  There are multiple methods suggested on the web to suppress the message but all are ineffectual for this case.  However even though this was a remarkably bizarre exercise there is at least one workaround, as follows.
The ‘punycode’ version (yes, there appear to be multiple versions from multiple developers) that node.js installs by default through their app was apparently deprecated around node.js version 7.  The current node.js version is around 23.  Go figure.
After running down multiple rabbit holes, wherein I kept running into Alice and/or the White Rabbit, I found the following process resolved my problems
My working solution is…

  • Uninstall node.js using Windows ‘Control Panel Items\Programs and Features’
  • Use ‘Powershell Administrator’ to install NVM for windows.
    Download nvm-setup.exe version 122 from Releases · coreybutler/nvm-windows
    Then once the install has completed…
  • Run ‘nvm [–]version’ to confirm that node.js has gone.
  • Check available node.js versions at https://nodejs.org/en/download/releases

(I found that version 20.18.2 disappeared the ‘punycode depreciation’ errors plus the Firebase generated Postgres warnings so am using it in this response.)

  • Run ‘nvm install 20.18.2’
  • Run ‘nvm use 22.18.02’
  • Run ‘Nvm debug’ to confirm the installation

Note that you can have multiple node.js versions installed using ‘nvm install xx.yy.zz’
Any one of which can then be selected using ‘nvm run xx.yy.zz’
My final step was to return to square one; create a new database complete with new account, user and location and start again.  Having already done it once it was quick exercise and everything worked fine.
Phew!

Best wishes,

Argus

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

Hi.
Thank you so much for providing the solution.
I guess I might have been using a different version that still runs with the deprecated punnycode.
 
I’ll also try your solution.
 
Thank you so much for taking the time to share it with us.
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.