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. #780

Closed
1 task done
jellehak opened this issue Apr 18, 2024 · 2 comments
Closed
1 task done

DeprecationWarning: The punycode module is deprecated. #780

jellehak opened this issue Apr 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jellehak
Copy link

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

On node 21, shows a warning:
DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

To Reproduce

  1. Use node v 21
  2. Make a request with the library

Code snippets

export async function convert({ prompt }) {
    const response = await openai.images.generate({
        prompt: `${prompt}`,
        n: 1,
        size: "1024x1024",
    });
    return response.data
}


### OS

macOS

### Node version

Node v21.7.2

### Library version

openai v4.37.1
@jellehak jellehak added the bug Something isn't working label Apr 18, 2024
@marck283
Copy link

marck283 commented Apr 18, 2024

That warning may depend on the fact that openai-node's most recent version still depends on node-fetch@2.6.7, but the developers here are trying to move to undici in #402.

@rattrayalex
Copy link
Collaborator

Yes, see other issues linking to that PR. Closing as a duplicate.

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

3 participants