hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
170 stars 65 forks source link

punycode deprecated #191

Open ataggdev opened 5 months ago

ataggdev commented 5 months ago

Had everything working for about a week. Then noticed that it stopped displaying photos, started digging and found that my token expired a couple days ago even though I did everything within the instructions to avoid that.

I started the process to renew the token and found when trying to run the "node generate_token_v2.js" I was getting

"(node:163930) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead."

Found similar problem here, https://stackoverflow.com/questions/68774489/punycode-is-deprecated-in-npm-what-should-i-replace-it-with

I went in and found that the below files would need the "require("punycode");" changed to "require('punycode/');".

MagicMirror/modules/MMM-GooglePhotos/node_modules/whatwg-url/lib/url-state-machine.js MagicMirror/modules/MMM-GooglePhotos/node_modules/tr46/index.js

After the change I was able to complete the generation process. I am hoping it won't break again after a week, I do have it set to in production within the Google API pages.

hermanho commented 5 months ago

related to https://github.com/googleapis/gaxios/issues/508