Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js 22: "[DEP0040] DeprecationWarning: The punycode module is deprecated." #802

Closed
MikeMcC399 opened this issue Apr 25, 2024 · 5 comments

Comments

@MikeMcC399
Copy link

MikeMcC399 commented Apr 25, 2024

Description

Running serve under Node.js 22.x version causes a deprecation notice similar to the following to be displayed:

$ serve -v
(node:3752) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
14.2.2

Node.js v22.0.0 (Current) was released on Apr 24, 2024.

Steps to reproduce

On Ubuntu 22.04.4 LTS with Node.js v22.0.0
On Ubuntu 22.04.5 LTS with Node.js v22.9.0

npm install serve@latest -g
export NODE_OPTIONS='--trace-deprecation'
serve -v

shows

$ serve -v
(node:4155) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
    at loadBuiltinModule (node:internal/modules/helpers:113:7)
    at Module._load (node:internal/modules/cjs/loader:1053:17)
    at Module.require (node:internal/modules/cjs/loader:1290:19)
    at require (node:internal/modules/helpers:188:18)
    at Object.<anonymous> (/home/mike/n/lib/node_modules/serve/node_modules/fast-url-parser/src/urlparser.js:401:16)
    at Module._compile (node:internal/modules/cjs/loader:1455:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1534:10)
14.2.2

Library version

14.2.2 and 14.2.3

Node version

v22.0.0 and v22.9.0

@MikeMcC399
Copy link
Author

@nemanjacosovic
Copy link

Probably not worth the mention, but yes it's present in node v22.5.0.

(node:96621) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

@MikeMcC399
Copy link
Author

@nemanjacosovic

I've updated the original posting with the latest versions serve 14.2.3 / Node.js v22.5.1.

@MikeMcC399
Copy link
Author

MikeMcC399 commented Oct 15, 2024

"serve-handler": "6.1.5",

@MikeMcC399
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants