mistval / node-fetch-cache

Node-fetch with built-in response caching.
MIT License
51 stars 8 forks source link

DeprecationWarning: The `punycode` module is deprecated #47

Closed sebagr closed 3 weeks ago

sebagr commented 3 months ago

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

This is caused by node-fetch 2.*

Solution is to upgrade to latest node-fetch^3

mistval commented 3 months ago

Hi, could you provide detailed steps to reproduce that warning?

sebagr commented 3 months ago

Sorry, forgot to mention this happens as of Node 21, where punycode is deprecated.

mistval commented 3 months ago

Ah thanks, I can reproduce. I'll see if I can update to node-fetch v3 (might be a little hairy since it's ESM and might have different internals from the ones that node-fetch-cache relies on in v2).

mistval commented 3 weeks ago

This is fixed with the newly published v5 which upgrades to node-fetch v3.