Skip to content

Cannot find module '@testing-library/react'.ts(2307) #472

@wolverineks

Description

@wolverineks
  • react-testing-library version: >= 9.1.2-alpha.0
  • react version: 16.8.4
  • node version: unknown
  • npm (or yarn) version: unknown

Relevant code or config:

import { render } from "@testing-library/react";

What you did:

Import library

What happened:

Typescript error: Cannot find module '@testing-library/react'.ts(2307)

Reproduction:

https://codesandbox.io/s/mystifying-lamport-wytox

Problem description:

Tests run just fine, but no types, and typescript error

Suggested solution:

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