jsdom / whatwg-url

An implementation of the WHATWG URL Standard in JavaScript
https://jsdom.github.io/whatwg-url/
MIT License
371 stars 94 forks source link

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

Closed An0nymous0 closed 1 year ago

An0nymous0 commented 1 year ago
(node:19882) [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:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
    at loadBuiltinModule (node:internal/modules/helpers:101:7)
    at Module._load (node:internal/modules/cjs/loader:1001:17)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
sobstel commented 1 year ago

@An0nymous0 Are you sure you're running most recent version? It looks like punycode dep has been completely removed in 13.x (https://github.com/jsdom/whatwg-url/commit/e89e642f02a8af7ab363b4bcdd252e6b49db5334)

sannajammeh commented 1 year ago

For anyone not directly using whatwg-url, this solved it for me.

pnpm (use whichever resolve method you have)

// package.json
  "pnpm": {
    "overrides": {
      "whatwg-url": "13.0.0"
    }
  }
domenic commented 1 year ago

I cannot reproduce this issue with the latest release.