sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

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

Open johnrivelt opened this issue 8 years ago • 2 comments

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

johnrivelt avatar Jun 13 '18 02:06 johnrivelt

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.

kamilogorek avatar Jun 13 '18 07:06 kamilogorek

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

johnrivelt avatar Jun 13 '18 09:06 johnrivelt