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

DeprecationWarning: The punycode module is deprecated. #2781

Closed
arose26 opened this issue Jun 6, 2024 · 2 comments
Closed

DeprecationWarning: The punycode module is deprecated. #2781

arose26 opened this issue Jun 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@arose26
Copy link

arose26 commented Jun 6, 2024

Overview

solana/web3.js@1.92.2 depends on node-fetch@2.7.0 which triggers the punycode warning with the latest node (21.7.3)

Steps to reproduce

Use any of the @solana/web3.js functions which do a fetch.
node --trace-deprecation filename.js gives the exact code line which triggers the warning.

Description of bug

The code @solana/web3.js/node_modules/whatwg-url/lib/url-state-machine.js:2:18
Triggers a warning:
(node:9843) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
The latest versions of node-fetch have solved this issue. Need to update dependency to a version higher than 2.7.0.

@arose26 arose26 added the bug Something isn't working label Jun 6, 2024
@steveluscher
Copy link
Collaborator

We can't go to the 3.x line of node-fetch because of their decision to go ESM-only.

This problem will go away completely in the 2.x line of @solana/web3.js because we don't use node-fetch at all.

Read more here, and try it out! https://github.com/solana-labs/solana-web3.js/releases/tag/tp3

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants