serve-handler icon indicating copy to clipboard operation
serve-handler copied to clipboard

Module `punycode` is deprecated since Node.js 21

Open cedx opened this issue 1 year ago • 6 comments

This library depends on the fast-url-parser package which depends on the punycode builtin module... but since Node.js 21, this module is deprecated:

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

Issue also raised on the fast-url-parser repository: cf. petkaantonov/urlparser#20

cedx avatar Oct 18 '23 17:10 cedx

[email protected] was released more than 8 years ago in Jan 2015.

fast-url-parser > README says:


#API

This module has exactly the same API and semantics as the require("url");- module that comes with node.

See Node.JS URL API documentation.


so perhaps the serve-handler module could be refactored to use Node.js' url instead?

MikeMcC399 avatar Oct 21 '23 08:10 MikeMcC399

Still seeing this every time I run vercel dev

montanaflynn avatar Apr 15 '24 19:04 montanaflynn

  • See also https://github.com/vercel/serve/issues/802

MikeMcC399 avatar Apr 25 '24 06:04 MikeMcC399

Docusaurus has the same problem.

mamiu avatar May 06 '24 05:05 mamiu

Also still seeing this, node v22.1.0

BatMiles avatar May 21 '24 14:05 BatMiles

FYI I published a fork @docusaurus/[email protected] with this warning fixed.

You can install it directly, or use an alias "serve-handler": "npm:@docusaurus/[email protected]",

I do not plan to maintain it, the goal was only to fix this warning.

slorber avatar Aug 23 '24 22:08 slorber