Skip to content

require-in-the-middle interferes with ESM #18860

@The-LukeZ

Description

@The-LukeZ

Environment

Ubuntu 24.04 Server, Interpreter is Bun, run with pm.

I believe, this also happens with node.js, but I'm not quite sure.

Steps to Reproduce

  1. Have @sentry/bun installed, always use await import() in the code.
  2. bun the app with pm2+bun in production mode (idk why it needs to be prod, but I don't get the error in dev mode)
  3. Observe the error logged in sentry.

Expected Result

It not throwing.

Actual Result

https://lukez-dev.sentry.io/share/issue/7baae5a7125d46ca84971f6344104cf0/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions