FG
🤖 AI & LLMsOpenAI

fetch is not exported from 'openai/_shims/fetch'

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score88%
88%

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

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: fetch is not exported from 'openai/_shims/fetch'

Low Risk

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?

84

Trust Score

2 verifications

100% success
  1. 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. 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

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

openaigptllmapibug