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

Upgrade whatwg-url dependency #2270

Closed
dannysheridan opened this issue Nov 11, 2023 · 2 comments
Closed

Upgrade whatwg-url dependency #2270

dannysheridan opened this issue Nov 11, 2023 · 2 comments

Comments

@dannysheridan
Copy link
Member

Is your feature request related to a problem? Please describe.
Whenever I run a fern command on my local system, I get the following message in my terminal.

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

Describe the solution you'd like
I'd like this to go away.

Describe alternatives you've considered
I suspect it's related to using the newest version of Node.js. v21.1.0

Additional context
The trace I see shows that the deprecation warning originates from the whatwg-url module, specifically from its usage of the punycode module.

The warning is triggered by code in the whatwg-url module, as indicated by the path whatwg-url/lib/url-state-machine.js and whatwg-url/lib/URL-impl.js.
The specific lines in the fern-api bundle where this occurs are mentioned (bundle.cjs:369261 and bundle.cjs:370331).

[ACTION]
Update Dependencies: Check if there is an updated version of whatwg-url that doesn't use the deprecated punycode module. Updating these dependencies might resolve the warning in the CLI.

@dsinghvi
Copy link
Member

This is related to two transitive dependencies (that we cannot remove) relying on node-fetch v2. For now, the best thing would be to not use node v21 to get rid of the error message. Thats what others are also advising: forcedotcom/cli#2535

│
├─ @redocly/openapi-core@npm:1.4.0
│  └─ node-fetch@npm:2.6.9 [79d8e] (via npm:^2.6.1 [79d8e])
│
└─ swagger2openapi@npm:7.0.8
   └─ node-fetch@npm:2.6.9 [79d8e] (via npm:^2.6.1 [79d8e])

@dannysheridan
Copy link
Member Author

Downgraded from Node v21.1 to v20.9 and the error message went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants