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 22: DeprecationWarning: The punycode module is deprecated. #1148

Open
1 task done
Mathias-S opened this issue Oct 25, 2024 · 1 comment
Open
1 task done

Node 22: DeprecationWarning: The punycode module is deprecated. #1148

Mathias-S opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Mathias-S
Copy link

Mathias-S commented Oct 25, 2024

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

Importing and using openai in the current LTS version of Node (v22) will give the following warning:

DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

To Reproduce

  1. Use the current LTS version of Node (v22)
  2. Import the openai package and use it in any way, e.g.
import openai from "openai"; 
console.log(typeof openai);
  1. Run the code. Node will log the aforementioned warning.

The expected behaviour is that the openai works without warnings in the current LTS version of Node.

There is no warning in older LTS versions of Node such as Node v18 and Node v20. However, as of this week, those are now in maintenance mode.

There are previous issues (#527 #750 #780) and a PR (#402) addressing this, but they have all been closed without any resolution or any new issues tracking the progress.

The root cause is the usage of [email protected].

Code snippets

No response

OS

macOS

Node version

Node v22

Library version

openai v4.68.4

@Mathias-S Mathias-S added the bug Something isn't working label Oct 25, 2024
@oakgary
Copy link

oakgary commented Nov 14, 2024

For anyone else stumbling upon this. The current most up to date context can be found here: #402 (comment)

-> They are working on internally resturcturing the API which would fix this issue; it's taking some time.

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

2 participants