-
-
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
Document how to use Node SDK with ESM + loader #11395
Comments
How do I combine this with |
is giving error:
|
gives
|
gives
|
I believe that tsx just transpiles to CJS, so it should work to just follow these docs: https://docs.sentry.io/platforms/javascript/guides/node/install/commonjs/ and ensure to import & run Sentry.init() before importing anything else. |
Generally, this is blocked by open-telemetry/opentelemetry-js#4547 (comment)
After that is resolved we should document how to use the esm loader. It should be the following:
node --experimental-loader=@sentry/node/hook app.js
node --import=@sentry/node/register app.js
The text was updated successfully, but these errors were encountered: