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

Not working with Bun #2268

Open
MickL opened this issue Mar 12, 2025 · 2 comments
Open

Not working with Bun #2268

MickL opened this issue Mar 12, 2025 · 2 comments
Labels

Comments

@MickL
Copy link

MickL commented Mar 12, 2025

Describe the bug

When using Bun for starting my Nitro app using bun .output/server/index.mjs I get:

error: Cannot find package 'stripe' from '/opt/render/project/myproject/.output/server/chunks/routes/product/_id/checkout.mjs'
      cause: error: Cannot find package 'stripe' from '/opt/render/project/myproject/.output/server/chunks/routes/product/_id/checkout.mjs',

On the other hand it works with the exact same built code when starting the app with node: node .output/server/index.mjs

To Reproduce

If required I can create a reproduction repo

Expected behavior

Code snippets

OS

macOS

Bun version

1.2.5

Library version

17.7.0

API version

Additional context

I have a lot of packages in my project, Stripe is the only one that ever gave me this error.

@MickL MickL added the bug label Mar 12, 2025
@xavdid-stripe
Copy link
Member

Hi there! Given that Bun is aiming to be a drop-in replacement for nodejs, I think issues for code that works in Node should be directed to the Bun folks.

We don't officially support Bun, but have been looking into wider runtime compatibility. If there's something we can do to improve compatibility we can probably make that happen (eventually).

But, first steps are probably to file an issue against Bun.

@MickL
Copy link
Author

MickL commented Mar 12, 2025

My guess is it could be about bundling. I saw you have bun scripts in the package.json. I will ask at Bun and Nitro and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants