VueJS 2 does not report errors (Sentry.io)

I have a Laravel application (5.4) with VueJs2 (2.1.10). I use Sentry.io as an error report for our Backend, which works great. When the error came from VueJs, I cannot catch it or send it to Sentry.

Here is the documentation that I used to install Sentry through NPM according to Raven settings: https://docs.sentry.io/clients/javascript/integrations/vue/

My configuration in app.js is the following:

import Raven from 'raven-js'; import RavenVue from 'raven-js/plugins/vue'; Raven .config('https://[filtered]@sentry.io/[filtered]') .addPlugin(RavenVue, Vue) .install(); 

Code building works fine through webpack. The question I would like to get is why Vuejs is not reporting any Sentry errors?

I tried to cause a couple of errors, including nonexistent template variables, HTTP error responses, incorrect component declaration, syntax errors. All of these errors result in console errors, but are not sent to Sentry.

Any suggestions on where to start or what to do to get an error report for working with Sentry and Vuejs2? Thanks in advance!

+5
source share

Source: https://habr.com/ru/post/1264134/


All Articles