Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Duplicate React dependency #1233

Closed
remijean opened this issue Apr 1, 2020 · 4 comments · Fixed by #1238
Closed

[BUG] Duplicate React dependency #1233

remijean opened this issue Apr 1, 2020 · 4 comments · Fixed by #1238
Milestone

Comments

@remijean
Copy link
Contributor

remijean commented Apr 1, 2020

Description/Screenshot

React is duplicated in my dependencies list, I get errors in my browser:

Capture d’écran de 2020-04-01 13-33-18

I run "npm ls react" and see that the duplication comes from this library:

Capture d’écran de 2020-04-01 13-32-48

Steps to Reproduce

  • OS/Browser: Chrome 80.0.3987.149 / Ubuntu 18.04
  • SDK Version [e.g. 22]: applicationinsights-react-js 2.5.3
  • How you initialized the SDK:

In my App file :

if (process.env.REACT_APP_MICROSOFT_APPLICATION_INSIGHTS_KEY) {
  var reactPlugin = new ReactPlugin()
  const browserHistory = createBrowserHistory({ basename: '' })
  var appInsights = new ApplicationInsights({
    config: {
      instrumentationKey:
        process.env.REACT_APP_MICROSOFT_APPLICATION_INSIGHTS_KEY,
      extensions: [reactPlugin],
      extensionConfig: {
        [reactPlugin.identifier]: { history: browserHistory },
      },
    },
  })
  appInsights.loadAppInsights()
}

Expected behavior

My project should not contain multiple copies of react. This is a problem according to the React documentation:

https://reactjs.org/warnings/invalid-hook-call-warning.html

If you see more than one React, you’ll need to figure out why this happens and fix your dependency tree. For example, maybe a library you’re using incorrectly specifies react as a dependency (rather than a peer dependency). Until that library is fixed, Yarn resolutions is one possible workaround.

Additional context
N/A

@MSNev MSNev added the fixed - waiting release PR Committed and waiting deployment label Apr 2, 2020
@MSNev
Copy link
Collaborator

MSNev commented Apr 2, 2020

Reopening to tag for release -- make it easier to see whats deployed and whats not

@MSNev MSNev reopened this Apr 2, 2020
@MSNev MSNev added this to the 2.5.4 milestone Apr 7, 2020
@MSNev
Copy link
Collaborator

MSNev commented Apr 8, 2020

Fixed deployed as NPM and next CDN channels

@MSNev
Copy link
Collaborator

MSNev commented Apr 8, 2020

Closing as this is an NPM issue only

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants