When you get started with Bugsnag, they have a handy guide to help you make sure errors are well reported to their monitoring tool. In Mailmeteor, we are using Bugsnag to make sure our tools are robust and bug-free.
But recently, when initializing a new TypeScript project on Bugsnag, I end up having this error: Cannot find name 'Bugsnag'
(which might also be seen as Bugsnag is not defined
).
Quick fix
Just add import Bugsnag from '@bugsnag/js'
. The type error is gone :-)
Top comments (0)