You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No error or at least an error that is more useful for debugging the issue.
Actual Result
This error in an endless loop:
ReferenceError: require is not defined
at file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/core/esm/baseclient.js:632:15
at Array.<anonymous> (file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:87:23)
at file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:183:19
at Array.forEach (<anonymous>)
at SyncPromise._executeHandlers (file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:173:20)
at SyncPromise._setResult (file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:161:10)
at _reject (file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:144:10)
at Array.<anonymous> (file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:84:13)
at file:///Users/tim/Documents/Repositories/repro/node_modules/@sentry/utils/esm/syncpromise.js:183:19
at Array.forEach (<anonymous>
The text was updated successfully, but these errors were encountered:
resolves#12500resolves#14165
`modulesIntegration` uses top-level require which will crash ESM apps if
you explicitly import and use the integration.
```mjs
// index.mjs
Sentry.init({
dsn: '__DSN__',
integrations: [
Sentry.modulesIntegration(),
]
});
```
This fixes that by adding a boolean check for cjs apps, and logging out
a warning as a result.
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
latest
Framework Version
No response
Link to Sentry event
No response
SDK Setup
modulesIntegration
is excluded by default when using ESM but it can be added manually.Steps to Reproduce
index.mjs
Expected Result
No error or at least an error that is more useful for debugging the issue.
Actual Result
This error in an endless loop:
The text was updated successfully, but these errors were encountered: