Skip to content

React as peerDependency to avoid multiple versions. #43

@marlomgirardi

Description

@marlomgirardi

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")
        }
        ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions