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

Bun runtime error: Cannot find module "openai/_shims/auto/runtime" from "/app/.output/server/node_modules/openai/_shims/index.mjs" #1011

Open
1 task done
marcelxpfeifer opened this issue Aug 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@marcelxpfeifer
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

When trying to run OpenAI in production with bun I get the following error
Cannot find module "openai/_shims/auto/runtime" from "/app/.output/server/node_modules/openai/_shims/index.mjs"

It can be reproduced with minimal setup using Nuxt.

To Reproduce

  1. Clone the repo Minimal Reproduction
  2. Run bun install
  3. Run bun build
  4. Run bun .output/server/index.mjs
  5. When opening localhost:3000/api/test the server should throw the error

Running with node works

Code snippets

No response

OS

macOS, Linux

Node version

Bun v1.1.26

Library version

openai v4.56.0

@marcelxpfeifer marcelxpfeifer added the bug Something isn't working label Aug 26, 2024
@RobertCraigie
Copy link
Collaborator

@marcelxpfeifer thanks for the report, if you haven't already could you also report this to bun?

@marcelxpfeifer
Copy link
Author

@marcelxpfeifer thanks for the report, if you haven't already could you also report this to bun?

Yes the issue can be found here

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

4 participants
@RobertCraigie @marcelxpfeifer and others