Can't get raven-node to work in my react app

I have a simple react.js app (not Native) running on nodejs. According to this page, all I need to do is do npm install --save raven, require Raven and call Raven.config(stuff).install(). I have done all this in my index.js file which is the root of my app, but triggering a deliberate error doesn’t show anything in the Sentry console.

On the other hand, including the two script tags as seen here does see my deliberate error, but all my console.log calls end up coming from raven.js:51 instead of index.js:51, so I don’t like that as a solution. What am I doing wrong with such a simple setup?

I also tried doing the above and also Raven.context(function () { // all your stuff goes here }); but that didn’t fix it either.

edit: using raven-js as the package instead of raven ‘worked’, but it defaults to logging all my console.logs as coming from console.js:26, which is really annoying. Still looking for a better solution.

raven is our node package and raven-js is the package for browsers.

On the other hand, including the two script tags as seen here does see my deliberate error, but all my console.log calls end up coming from raven.js:51 instead of index.js:51, so I don’t like that as a solution. What am I doing wrong with such a simple setup?

That is a side effect of the patching of breadcrumbs. There is nothing we can do about that but you can disable breadcrumbs for the console to restore the original locations. We recommend doing that for development but not production.