caprover-cli icon indicating copy to clipboard operation
caprover-cli copied to clipboard

`punycode` deprecated warning under Node 22

Open shazron opened this issue 1 year ago • 0 comments

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)

[email protected]
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
|       `-- [email protected]
|         `-- [email protected]
|           `-- [email protected]
|             `-- [email protected] deduped
`-- [email protected]
  `-- [email protected]
    `-- [email protected]

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)

  • https://github.com/salesforce/tough-cookie/issues/456
  • https://github.com/salesforce/tough-cookie/releases/v5.0.0 (note the breaking changes)

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

shazron avatar Dec 04 '24 08:12 shazron