vercel / serve-handler

The foundation of `serve`
https://npmjs.com/serve-handler
MIT License
578 stars 97 forks source link

Module `punycode` is deprecated since Node.js 21 #204

Closed cedx closed 3 weeks ago

cedx commented 1 year ago

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

MikeMcC399 commented 1 year ago

fast-url-parser@1.1.3 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?

montanaflynn commented 6 months ago

Still seeing this every time I run vercel dev

MikeMcC399 commented 6 months ago
mamiu commented 6 months ago

Docusaurus has the same problem.

BatMiles commented 5 months ago

Also still seeing this, node v22.1.0

slorber commented 2 months ago

FYI I published a fork @docusaurus/serve-handler@6.2.0 with this warning fixed.

You can install it directly, or use an alias "serve-handler": "npm:@docusaurus/serve-handler@6.2.0",

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