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 #47445

Closed
drazisil opened this issue Apr 16, 2023 · 4 comments
Closed

Not working with Bun #47445

drazisil opened this issue Apr 16, 2023 · 4 comments

Comments

@drazisil
Copy link

drazisil commented Apr 16, 2023

Environment

SaaS (https://sentry.io/)

Version

No response

Link

No response

DSN

No response

Steps to Reproduce

  1. Install bun (https://bun.sh/) (0.5.9)
  2. Add @sentry/node (7.48.0) to a JS or TS file.
  3. Attempt to run with bun
  4. Receive error shown in Unexpected keyword "export", when importing Sentry oven-sh/bun#1270

Code at time of attempt is commit SHA https://github.com/drazisil/mcos/tree/bfbfa8b89b0b1da785ef6e368a021a005c82a9e3

Expected Result

Sentry work when being run with Bun. Yes, I know that Bun is pre-v1 :)

Actual Result

1 | export { _asyncNullishCoalesce } from './_asyncNullishCoalesce.js';
2 | export { _asyncOptionalChain } from './_asyncOptionalChain.js';
3 | export { _asyncOptionalChainDelete } from './_asyncOptionalChainDelete.js';
4 | export { _createNamedExportFrom } from './_createNamedExportFrom.js';
   ^
TypeError: Unexpected keyword 'export' while parsing module "/home/drazisil/mcos/node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/_createNamedExportFrom.js"
      at /home/drazisil/mcos/node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/index.js:4:0
@getsantry
Copy link
Contributor

getsantry bot commented Apr 16, 2023

Assigning to @getsentry/support for routing, due by Monday, April 17th at 5:00 pm (sfo). ⏲️

@Jarred-Sumner
Copy link

This particular issue is a bug in Bun and not something Sentry should spend time fixing one-off

@AbhiPrasad
Copy link
Member

Yup, I think once in Bun is in a more stable state we can even add some docs around it - @Jarred-Sumner happy to help provide the sentry libs as a dog fooding environment (esp since we emit cjs, esm, umd, and more).

Going to create a new issue so that we can track the Sentry SDK working on Bun, we want to try to get to this in the next 1-2 months.

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
@AbhiPrasad
Copy link
Member

Decided against a new issue - Bun is listed as part of getsentry/sentry-javascript#5611.

@Jarred-Sumner is the plan to have Bun be fully compat with Node APIs? Or just WinterCG?

@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants