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

React as peerDependency to avoid multiple versions. #43

Open
marlomgirardi opened this issue Aug 6, 2019 · 3 comments
Open

React as peerDependency to avoid multiple versions. #43

marlomgirardi opened this issue Aug 6, 2019 · 3 comments

Comments

@marlomgirardi
Copy link
Contributor

To avoid this kind of issue:

WARNING in react
  Multiple versions of react found:
    16.6.1 ./~/@feedzai/brushable-histogram/~/react
    16.8.6 ./~/react

React must be a peerDependency locked in the major release (16.x).

An alternative is to use react as an alias in the webpack config.

{
    resolve: {
        ...
        alias: {
            "react": path.resolve(__dirname, "node_modules/react")
        }
        ...
    }
}
@nancruz
Copy link
Contributor

nancruz commented Aug 6, 2019

We should go to the first alternative.

@lfac-pt
Copy link
Member

lfac-pt commented Aug 7, 2019

I agree with @nancruz , do you want to make a PR with that change @marlomgirardi ?

@marlomgirardi
Copy link
Contributor Author

Yes, I can do that. Just let us see if we have more issues with the histogram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants