Skip to content

Node 22 Deprecation

Using this lib with node 22 causes the following error to get logged upon startup:

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

Doing a trace reveals the following:

╰─○ node --trace-deprecation .
(node:66030) [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:96:7)
    at Module._load (node:internal/modules/cjs/loader:1037:17)
    at Module.require (node:internal/modules/cjs/loader:1271:19)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/Users/rishipanthee/Desktop/ZingAchievement/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
    at Module.load (node:internal/modules/cjs/loader:1249:32)
    at Module._load (node:internal/modules/cjs/loader:1065:12)
    at Module.require (node:internal/modules/cjs/loader:1271:19)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/Users/rishipanthee/Desktop/ZingAchievement/node_modules/whatwg-url/lib/URL-impl.js:2:13)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)

From what I can tell, the issue stems from whatwg-url which is one of the deps in this project: https://gitlab.syncad.com/hive/hive-js/-/blob/master/yarn.lock?ref_type=heads#L3312

Going to have to see if we can remove it's usage or see what imports it and update the dep.