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

Bundling with @sentry/[email protected] no longer outputs .node files, 8.47.0 does #15026

Open
2 of 3 tasks
rgripper opened this issue Jan 15, 2025 · 2 comments · May be fixed by #15056
Open
2 of 3 tasks

Bundling with @sentry/[email protected] no longer outputs .node files, 8.47.0 does #15026

rgripper opened this issue Jan 15, 2025 · 2 comments · May be fixed by #15056
Labels
Package: node Issues related to the Sentry Node SDK

Comments

@rgripper
Copy link

rgripper commented Jan 15, 2025

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.39.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

@sentry/[email protected]
esbuild (or bun) no longer outputs *.node binaries with my instrument.js using

  loader: {
    // ensures .node binaries are copied to ./dist
    ".node": "copy",
  },

But @sentry/[email protected] works fine

Expected Result

the output folder contains multiple *.node binaries and instrument.js

Actual Result

the output folder contains only instrument.js

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 15, 2025
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Jan 15, 2025
@s1gr1d
Copy link
Member

s1gr1d commented Jan 16, 2025

Hello, thanks for reaching out! This bug was most likely introduced in this PR: #14952
I was able to reproduce it and we're on it to fix this!

For now, you can downgrade to 8.48.0 or try to copy the node binaries from node_modules/@sentry/profiling-node/lib

@s1gr1d
Copy link
Member

s1gr1d commented Jan 17, 2025

For more context: esbuild does not support createRequire and there is an open issue for this: evanw/esbuild#1828

As node-based libraries were not instrumented with Sentry correctly when using them together with profiling, this PR was added to fix this: #14470 (released with 8.49.0).
This PR basically removes storing require etc. on globalThis as this was the root-cause of a set of problems. However, storing those variables on globalThis is also one of the proposed short-term solutions in esbuild to support ESM and CJS: evanw/esbuild#1921 (comment)

@s1gr1d s1gr1d linked a pull request Jan 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants