Sentry-javascript: Angular 6 Error Raven.config is not a function Evaluating src/app/app.module.ts

Created on 13 Jun 2018  路  2Comments  路  Source: getsentry/sentry-javascript

Do you want to request a feature or report a bug?
BUG

What is the current behavior?
Can not start Angular app as Raven.config error

Error in src/app/app.module.ts (11:3)
Raven.config is not a function
Evaluating src/app/app.module.ts
Evaluating src/main.ts
Booting application

see https://stackblitz.com/edit/angular-sentry-ravenjs

What is the expected behavior?
No error

Most helpful comment

Thanks, @kamilogorek.
Sentry documentation for angular need to be modified.

All 2 comments

Use import Raven from 'raven-js'; instead of import * as Raven from 'raven-js'; and it will work.
We don't export named functions yet and Raven itself is a singleton.

Thanks, @kamilogorek.
Sentry documentation for angular need to be modified.

Was this page helpful?
0 / 5 - 0 ratings