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

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

Open
Pat-Ayres opened this issue Nov 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Pat-Ayres
Copy link

I didn't see any issues referencing this deprecation, so just wanted to post a notification.

Node 21.2.0 has deprecated the punycode module. Since upgrading my node version to 21.2.0 I see the deprecation warning with every leapp cli command I run. This is particularly noisy in some scripts I have where multiple leapp commands are used together and each one emits the deprecation warning.

❯ leapp profile list
(node:75956) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 Profile Name
 ─────────────────────────────────────────────
 default

Leapp Version

❯ leapp --version
@noovolari/leapp-cli/0.1.46 darwin-arm64 node-v21.2.0

Additional context
This came up for me because I don't use node on my host specifically so I wasn't paying close attention to the version. I had just installed it via brew install node and letting it upgrade when I do my brew updates.

I was able to uninstall node with brew uninstall --ignore-dependencies node (I needed --ignore-dependencies because the leapp brew formula depends on) and then switching to nvm to install the lts version explicitly.

@Pat-Ayres Pat-Ayres added the bug Something isn't working label Nov 21, 2023
@andreacavagna01
Copy link
Contributor

Thanks for this feedback. I think that upgrading the package json will solve this issue.

Thanks for pointing it out!

@urz9999
Copy link
Contributor

urz9999 commented Feb 1, 2024

Hi @Pat-Ayres we are currently investigating alternatives to the library, in the meanwhile you can add this command NODE_OPTIONS="--no-deprecation" to your .bashrc/.zshrc or use it before the commands to hide the warning. Let me know if this can help as a workaround

@murshed-panorama
Copy link

murshed-panorama commented Feb 11, 2024

@urz9999 Thanks for the suggestion, but unfortunately it didn't work for me. I added the line to my .zshrc file, source'd, but still saw the deprecation warnings when I ran leapp profile list. I'm on node v21.4.0. I did confirm NODE_OPTIONS was set in the shell with echo $NODE_OPTIONS.

The workaround to use nvm instead was successful.

@ericvilla
Copy link
Contributor

Hi @murshed-panorama, I did a test with node v21.4.0
I appended export NODE_OPTIONS='--no-deprecation' to my ~/.zshrc file, sourced it, and run leapp profile list.
The following is the output (I've just a single default profile):

❯ leapp profile list
 Profile Name
 ────────────
 default

Well, this is just a way to hide the deprecation warning; a valid alternative to the deprecated punycode module should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants