@sentry/browser
- "^5.0.6"@sentry/node
raven-js
raven-node
_(raven for node)_5.0.6
I followed the guidance in here; https://docs.sentry.io/platforms/node/typescript/ to add Sentry and send source maps from a React + TypeScript app.
I define global.__rootdir__
, as the docs suggest, but, and as per the page from the docs, add the following to one of the earliest loaded files;
Sentry.init({
dsn: '',
integrations: [new Sentry.Integrations.RewriteFrames({
root: global.__rootdir__
})]
});
Now, when starting the app, it gives the following;
UnhandledPromiseRejectionWarning: TypeError: a.Integrations.RewriteFrames is not a constructor
I've also tried removing the whole integrations
part from Sentry.init
. When I do this, errors get reported correctly, and the "source maps" get uploaded (so I'm satisfied that everything else seems to be working), but the backtraces remain unreadable.
Have I missed something here?
@mtthwhggns we missed docs update, not you, sorry :)
https://docs.sentry.io/platforms/javascript/?platform=node#adding-integration-from-sentryintegrations
tl;dr
import { RewriteFrames } from '@sentry/integrations';
Sentry.init({
dsn: '',
integrations: [new RewriteFrames({
root: global.__rootdir__
})]
});
I'll update the docs, thanks!
Thank you @kamilogorek
This seems to work perfectly!
The docs are still out-of-date. https://docs.sentry.io/platforms/node/typescript/ I had to Google to find this thread and fix my issue as well. https://github.com/getsentry/sentry-docs/blob/master/src/collections/_documentation/platforms/node/typescript.md
@emhagman I should've done it the same time I wrote the comment above 馃槖 Sorry about that.
Fixed - https://github.com/getsentry/sentry-docs/pull/985
No problem, thanks!
Hi!
I had the same issue because there is someplace in the docs where it has not been updated
https://docs.sentry.io/platforms/node/sourcemaps/#updating-sentry-sdk-configuration-to-support-source-maps
Thanks @Heavenston! Updated https://github.com/getsentry/sentry-docs/pull/1089 :)
Module not found: Error: Can't resolve '@sentry/integrations'
@alexeychikk npm install @sentry/integrations
Nothing is working out of the box, setup process in unclear and totally broken, source maps uploading is a mess. Sentry is just a waste of time. Spent literally two days and had no success.
Most helpful comment
Nothing is working out of the box, setup process in unclear and totally broken, source maps uploading is a mess. Sentry is just a waste of time. Spent literally two days and had no success.