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

Dependency on deprecated punycode module #404

Open
jetzezoethout opened this issue Oct 31, 2023 · 4 comments
Open

Dependency on deprecated punycode module #404

jetzezoethout opened this issue Oct 31, 2023 · 4 comments

Comments

@jetzezoethout
Copy link

Running a project using ravendb on the newest version of node (v21) yields a deprecation warning.

Minimal example

package.json

{
  "dependencies": {
    "ravendb": "5.4.1"
  },
  "scripts": {
    "start": "node main.js"
  }
}

main.js

const { DocumentStore } = require("ravendb");

const store = new DocumentStore(/* Your DB connection info */).initialize();

After running npm i, we get the following behaviour:

$ npm run start

> start
> node main.js

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

On older versions of node, the same warning can be seen by adding the --pending-deprecations flag.

The dependency on punycode seems to enter through node-fetch v2. Simply updating to v3 might do the trick.

Specific version information

  • OS: Ubuntu 22.04
  • Node: 21.0.0
  • npm: 10.2.0
@ml054
Copy link
Member

ml054 commented Oct 31, 2023

punycode is transtive dependency of eslint. Even when using latest version of eslint (8.52.0). Please also notice that eslint is dev dependency.

If you want to you can similar issue to eslint library.

In node-fetch I don't see dependency to punycode (https://github.com/node-fetch/node-fetch/blob/main/package.json)

@jetzezoethout
Copy link
Author

jetzezoethout commented Oct 31, 2023

Thanks for your quick reply! I'm aware that punycode is a transitive dependency of eslint, but dev dependencies shouldn't cause runtime warnings in node. I did a bit more digging: running node with the --trace-deprecations flag shows that punycode is used in whatwg-url, which enters through node-fetch:

$ npm list whatwg-url
Test@ ~/Documents/Test
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected]

@ml054
Copy link
Member

ml054 commented Oct 31, 2023

ok we will investigate that with node 21. Thanks :)

@domdomegg
Copy link

For the eslint dependency: garycourt/uri-js#95

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