-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as duplicate of#1207
Closed as duplicate of#1207
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
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
- Use the current LTS version of Node (v22)
- Import the
openaipackage and use it in any way, e.g.
import openai from "openai";
console.log(typeof openai);- 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 node-fetch@2.7.0.
Code snippets
No response
OS
macOS
Node version
Node v22
Library version
openai v4.68.4
nwalters512, Xhale1, daflyinbed, zeen, y1wtt and 7 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working