Skip to content

Not working with Bun #47445

@drazisil

Description

@drazisil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions