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

@types/testing-library__react"' has no exported member 'waitFor' #688

Closed
matassp opened this issue Jun 3, 2020 · 6 comments · Fixed by liquity/dev#356
Closed

@types/testing-library__react"' has no exported member 'waitFor' #688

matassp opened this issue Jun 3, 2020 · 6 comments · Fixed by liquity/dev#356
Labels

Comments

@matassp
Copy link

matassp commented Jun 3, 2020

Sorry, for duplicating issue #610 , but it looks like it was closed unresolved.

    "@testing-library/react": "10.0.5",
    "@testing-library/jest-dom": "5.9.0",
    "react": "16.13.1",

Relevant code or config:
import { waitFor } from '@testing-library/react';

What happened:
I get a typescript error:

@types/testing-library__react"' has no exported member 'waitFor'.ts(2305)

@samtsai
Copy link
Collaborator

samtsai commented Jun 3, 2020

@matassp what version of @testing-library/dom is in your yarn.lock or package-lock.json?

@pranjaljately
Copy link

The quickest way I found to fix this was to:

  1. Delete node_modules and your .lock file (yarn or package-lock)
  2. Install the dependencies again (npm install or yarn install)

@samtsai
Copy link
Collaborator

samtsai commented Jun 3, 2020

IMO, I think this should be closed then. I can see this issue being annoying and uncertain but when it comes to dependency management and types on type of that this sort of comes with the territory.

@kentcdodds
Copy link
Member

I'm definitely willing to accept a pull request to bring type definitions within this repo like we did with DOM Testing Library. That would help us avoid issues like this in the future.

samtsai added a commit to samtsai/react-testing-library that referenced this issue Jun 3, 2020
@kentcdodds
Copy link
Member

🎉 This issue has been resolved in version 10.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matassp
Copy link
Author

matassp commented Jun 5, 2020

Thank you!

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