- Node 22 will start showing warnings that
punycode is deprecated, and a userland solution must be used
- Lots of 3rd party
node_modules use native punycode and many are out of our control. It's too many. Especially because node-fetch depends on punycode, and even if this itself is now native .... we all know what a chaos is in node_modules.
- Anyway, what I did, was to install
module-alias and then add before anything else (node -r or via NODE_OPTIONS):
const moduleAlias = require('module-alias');
moduleAlias.addAlias('punycode', 'punycode/');
And it works.
I recommend adding this in the README. I can do it, if I know you will accept it.