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
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
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
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
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