-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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/profiling-node@8.49.0 no longer outputs .node
files, 8.47.0 does
#15026
Comments
Hello, thanks for reaching out! This bug was most likely introduced in this PR: #14952 For now, you can downgrade to |
For more context: esbuild does not support 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 |
To make native module loading compatible with more bundlers you can ensure you always do the loading in a CJS context with
function loadBindings() {
// simplified 😂
return require('./path/to/module.node');
}
exports.loadBindings; Since ESM can load CJS, you can just do this in ESM: import { loadBindings } from './load.cjs'; CJS can just load the CJS: const { loadBindings } = require('./load.cjs'); |
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/profiling-node@8.49.0
esbuild (or bun) no longer outputs
*.node
binaries with my instrument.js usingBut
@sentry/profiling-node@8.47.0
works fineExpected Result
the output folder contains multiple
*.node
binaries andinstrument.js
Actual Result
the output folder contains only
instrument.js
The text was updated successfully, but these errors were encountered: