I’m using React create-react-app. I’m using raven-js. When I import Raven from 'raven-js
and Raven.config('https://mysentryurl').install()
, I get this:
Without it, I get the actual line number where the console.log occurred (e.g., App.js:15
).
This is a pretty big disincentive to using the service. I was able to find a workaround by using dotenv
, which bundles with create-react-app, and wrapping my Raven invocation as follows:
if (process.env.NODE_ENV !== 'development') { let Raven = require('raven-js'); Raven.config('myurl').install() }
Do I need to check my environment anytime I make a call to Raven?