DataDog/dd-trace-js

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

aseemk opened this issue · 2 comments

Hi there,

I've been getting these deprecation warnings from Node. When I run with --trace-deprecation, the stack trace points to this library:

(node:67219) [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:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:108:7)
    at Module._load (node:internal/modules/cjs/loader:1099:17)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at Hook.Module.require (/Users/aseemk/Projects/Portola/backend/node_modules/.pnpm/dd-trace@5.23.1/node_modules/dd-trace/packages/dd-trace/src/ritm.js:97:33)
    at require (node:internal/modules/helpers:135:16)

You can see I've even tried upgrading to (what I believe is) the latest dd-trace version 5.23.1, and I'm running the latest Node v22:

$ node --version
v22.9.0

I realize it looks like the actual punycode usage is coming from within Node itself. But is there anything y'all know about or can help with here? Would love to get rid of this warning every time I run my app. =) Thanks!