-
-
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'); |
@s1gr1d @timfish Will a fix for this be backported to 8.x ? Or maybe I'm not understanding how to apply the fix in my environment. I'm still seeing this issue on 8.52.1 We're using
When I do a regular However, when I do a Next.js production build with I've confirmed that this behavior started with 8.49.0 (binaries are present in Thank you! |
This is currently fixed only in v9. The changes are quite large so I'm not sure how easy this would be to backport to v8. |
@timfish It was surprising to me that such a substantial change to the bundling process was backported onto v8 to begin with --- the commit that introduced this bug feels like a "breaking change" that probably should not have backported onto v8 --- could this commit to v8 branch be reverted (from v8 branch only)? 785aab3 |
We may backport this, when we verified the change actually fixes the problems. We'll release another v9 alpha soon where we can hopefully verify this! |
9.0.0-alpha.1 has been released. Can anyone who's having bundling issues with v8 test to confirm this fixes your issues? |
@timfish I still run into bundling errors, as
all -93.node profiles are failing |
Oh thanks for testing this. That issue has been fixed but it looks like we need a new release! |
v2.1.0 has been released so if you update your dependencies this should now be fixed: |
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: