node-fetch-cache icon indicating copy to clipboard operation
node-fetch-cache copied to clipboard

DeprecationWarning: The `punycode` module is deprecated

Open sebagr opened this issue 1 year ago • 3 comments

(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

sebagr avatar May 17 '24 14:05 sebagr

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

mistval avatar May 18 '24 17:05 mistval

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

sebagr avatar May 18 '24 17:05 sebagr

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 avatar May 18 '24 17:05 mistval

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

mistval avatar Aug 17 '24 15:08 mistval