-
-
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
profiling-node should not shim cjs globals #13259
Comments
Hi, thanks for writing in. I've kicked this up to the respective team, but generally I'd agree we should guard against this. We'll take a look. |
@mbrevda thanks for opening the issue, the SDK should indeed handle this. I'm making the change to only conditionally apply the shims and will try and get it merged asap so it can go out with the next minor release |
Awesome, looking forward. Thanks for the quick reply! |
hi - how's this coming along? |
Thanks, any idea what the hold is there? |
Hi, the PR is still under review. Not entirely sure about specifics there but @AbhiPrasad took a look yesterday. Feel free to subscribe to this issue as it's gonna be closed once the PR gets merged. |
@mbrevda sorry I was ooo last week, let me take a look at this now. |
@mbrevda PR is ready and CI is passing. We'll get this merged tomorrow and ship it with the next release, sorry for the wait! |
Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.30.0 - thanks for your patience everyone! |
(sorry, the regular templates weren't working for me - github was returning an ambiguous error).
As I try updating to v8 (8.24.0), I'm encountering an issue where profiling-node tries to shim cjs globals without first checking if they are set. This is done via the
@rollup/plugin-esm-shim
package in the rollup config, resulting in some cjs specific globals being injected even if they are already defined (see lines 19-21).This is an issue because some bundlers require defining these globals manually (where they require defining the cjs globals), causing the Sentry variables to error with
SyntaxError: Identifier '__filename' has already been declared
I'd expect
that Sentry should not define global variables. If these variables are crucial and there is no other way to define them, respectfully check if they are set before defining them.
Thanks!
The text was updated successfully, but these errors were encountered: