question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`BugsnagClient.getPlugin( "react" )` is `undefined`.

See original GitHub issue

Hi There,

I followed your React integration guide to a T, trying to get Bugsnag reporting from our Electron app.

I have the following:

import Bugsnag      from "@bugsnag/js";
import BugsnagReact from "@bugsnag/plugin-react";

const BugsnagClient = Bugsnag( "my_api_key" );
const ErrorBoundary = BugsnagClient.getPlugin( "react" );

console.log( "ErrorBoundary", ErrorBoundary ); // => undefined

But, as is shown above, ErrorBoundary is undefined.

Thoughts?

Also, is import BugsnagReact from "@bugsnag/plugin-react"; necessary since it’s not referenced anywhere?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
durgesh94commented, Aug 4, 2021

The issue is that you’re calling Bugsnag.getPlugin(‘react’) before you call Bugsnag.start().

2reactions
petarprokocommented, Jun 25, 2021

For those who are still having issues try executing Bugsnag.start() function before ErrorBoundary object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React integration guide - JavaScript - Bugsnag docs
React integration guide. Add Bugsnag to your React projects to automatically capture and report errors in production.
Read more >
How to mock Bugsnag in jest test cases for a react app
trying to do jest.mock("@bugsnag/js") but getting error TypeError: Cannot read property 'createErrorBoundary' of undefined.
Read more >
the above error occurred in the <a> component: - You.com | The ...
The match prop is undefined. For whatever reason this ArticlePage component isn't receiving a defined match prop. Solution. Regardless of react-router-dom ...
Read more >
@bugsnag/plugin-react | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
bugsnag Changelog - PyUp.io
getPlugin ('react')` [839](https://github.com/bugsnag/bugsnag-js/pull/839) ... Fixes a bug in IE11 where it converts `undefined` to a string, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found