-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
SDK does not support ESM in main process #751
Comments
It seems import Sentry from '@sentry/electron';
|
@timfish I can not use sentry with Electron 28 in ESM environment. It is impossible to import cjs version due to Could it be fixed? |
It was on the list to test but I wasn't aware of a release yet since v27 is still in beta. I see there's a nightly. Is that what you're using? It should be relatively easy to fix and I need to add some integration tests too. |
Yes, I'm using nightly Electron 28 electron/electron#37535 (comment) to have ESM only code. |
This should be working in 4.12.0 but it won't be fully tested until there's a beta release that we can run through the full test suite. |
this seems to be broken again in 4.17+ |
We test the latest versions of Electron with ESM in the main process. Can you open an issue with some reproduction steps? |
unfortunately it's not very consistent, I have two electron apps... one where it's working and one where I get
both apps have identical tsconfigs, same sentry versions, same usage |
Can you open a new issue with the full stack trace? |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Electron SDK Version
4.11.0
Electron Version
28
What platform are you using?
MacOS
Link to Sentry event
No response
Steps to Reproduce
Electron 28 with ESM support
Expected Result
Named export is supported as it shown in the readme
Actual Result
SyntaxError: Named export 'init' not found. The requested module '@sentry/electron' is a CommonJS module, which may not support all module.exports as named exports.
The text was updated successfully, but these errors were encountered: