Closed Jimmy89 closed 2 weeks ago
Hey @Jimmy89, you can safely remove @sentry/node
as this should already be included in @sentry/aws-serverless
.
Following the steps you outlined I could not reproduce this issue. Are you running this locally on your machine?
@chargome Thank you for your quick answer. We got the issue at 8.30.0, after that our node_modules cache seems to have corrupted. A clean node_modules with the latest Sentry fixed the issue.
Also thanks for noting that the @sentry/node is not needed.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.34.0
Framework Version
NodeJS v20
Link to Sentry event
No response
Reproduction Example/SDK Setup
Import Sentry from any Sentry javascript package above 8.29.0
main.mjs
:Package.json dependencies:
Run
node main.mjs
, get the error:The
@opentelemetry/semantic-conventions
package does not support ESModules correctly (yet) and therefore the imports must be written like the error states as global import statements, where the variables can be destructered from.If I manually resolve the error, I get the same error within other Sentry package files, so the codebase must be scanned on multiple references.
Steps to Reproduce
import * as Sentry from "@sentry/aws-serverless";
node main.mjs
Expected Result
No import errors coming from any Sentry package.
Actual Result
Cannot use Sentry Javascript packages in any way in ESModules project