Skip to content

@testing-library/react has transitive deps to @types/react: * #508

Closed
@jackyef

Description

@jackyef
  • react-testing-library version: 9.3.0

What you did:

We have a react library written in typescript that has exact devDependency to @types/react: "16.9.9". @testing-library/react` is also one of the library devDependencies.

What happened:

When installing all devDependencies (including bundler and babel stuffs) so we can build our library, we ended up with 2 different @types/react, because @testing-library/react has deps to @types/react: *, which resolves to a newer version of @types/react.

Because there are 2 different @types/react, tsc will fail when trying to build our package.

Suggested solution:

Set @types/* packages as devDependencies of @testing-library/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