Skip to content

punycode deprecated warning under Node 22 #148

@shazron

Description

@shazron

When running caprover-deploy for example, under Node 22, you get this deprecation notice:

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

Dependency tree (npm ls punycode)

caprover@2.3.1
+-- eslint@6.2.2
| `-- ajv@6.10.2
|   `-- uri-js@4.2.2
|     `-- punycode@2.1.1
+-- jest@24.9.0
| `-- jest-cli@24.9.0
|   `-- jest-config@24.9.0
|     `-- jest-environment-jsdom@24.9.0
|       `-- jsdom@11.12.0
|         `-- whatwg-url@6.5.0
|           `-- tr46@1.0.1
|             `-- punycode@2.1.1 deduped
`-- request-promise@4.2.5
  `-- tough-cookie@2.4.3
    `-- punycode@1.4.1

Investigation

Explanation in this section here: https://www.npmjs.com/package/punycode#installation

Fix

The prod dependency tough-cookie should be updated to v5.0.0 (however it is a sub-dep, of the dep request-promise which will never receive an update)

request-promise should be upgraded to another library like node-fetch, since it has been deprecated 4 years ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions