fetch is not exported from 'openai/_shims/fetch'
Problem
Confirm this is a Node library issue and not an underlying OpenAI API issue - [X] This is an issue with the Node library Describe the bug I am getting the following error when trying to instantiate my OpenAI client. [code block] To Reproduce Instantiate openAI with the following: [code block] Code snippets The OpenAI definition in my package.json is `"openai": "^4.2.0"` My `tsconfig.json` file: [code block] ``` OS macOS Node version v20.2.0 Library version 4.2.0
Error Output
error when trying to instantiate my OpenAI client.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: fetch is not exported from 'openai/_shims/fetch'
Got it, thanks @YourAverageTechBro! I think we'd want our library to work on serverless or edge runtimes seamlessly, so I think I'd regard this as a bug (unless there's something particularly strange about your setup). Could you share your `package.json` to help us with reproduction and debugging?
Trust Score
2 verifications
- 1
Got it, thanks @YourAverageTechBro! I think we'd want our library to work on ser
Got it, thanks @YourAverageTechBro! I think we'd want our library to work on serverless or edge runtimes seamlessly, so I think I'd regard this as a bug (unless there's something particularly strange about your setup).
- 2
Could you share your `package.json` to help us with reproduction and debugging?
Could you share your `package.json` to help us with reproduction and debugging?
Validation
Resolved in openai/openai-node GitHub issue #243. Community reactions: 1 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep