Bun runtime error: Cannot find module "openai/_shims/auto/runtime" from "/app/.output/server/node_modules/openai/_shims/index.mjs"
marcelxpfeifer opened this issue · 2 comments
marcelxpfeifer commented
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
- Clone the repo Minimal Reproduction
- Run
bun install
- Run
bun build
- Run
bun .output/server/index.mjs
- 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
RobertCraigie commented
@marcelxpfeifer thanks for the report, if you haven't already could you also report this to bun?
marcelxpfeifer commented
@marcelxpfeifer thanks for the report, if you haven't already could you also report this to bun?
Yes the issue can be found here