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

v10.0.2 pulling incorrect dom types #639

Closed
aganglada opened this issue Apr 16, 2020 · 4 comments
Closed

v10.0.2 pulling incorrect dom types #639

aganglada opened this issue Apr 16, 2020 · 4 comments

Comments

@aganglada
Copy link

aganglada commented Apr 16, 2020

  • @testing-library/react version: 10.0.2
  • react version: 16.9.0
  • node version: 10.15.3
  • npm (or yarn) version: yarn 1.6.0

What you did:

I updated @testing-library/react to latest in my project (using typescript)

Problem description:

The version of the code is fine, but @types/testing-library__dom are still on version 6.0.1 and not the latest 7 (missing screen, waitFor...etc.)

Screenshot 2020-04-16 at 09 21 04

Problem solution:

This * in dependencies, seems to be pulling version 6
https://unpkg.com/browse/@types/testing-library__react@10.0.1/package.json

Or at least this is what my yarn.lock says.

Screenshot 2020-04-16 at 09 27 26

@aganglada aganglada changed the title v10.2.0 pulling incorrect dom types v10.0.2 pulling incorrect dom types Apr 16, 2020
@eps1lon
Copy link
Member

eps1lon commented Apr 16, 2020

Removing the lockfile entries for the @types/testing-library__* packages and running yarn install should pull in the latest versions. See #620 for more context.

@aganglada
Copy link
Author

Newly installed node_modules and fresh yarn.lock seem to make this work now.

All you have to do:

  • Remove node_modules/
  • Remove yarn.lock
  • Run yarn

Hope this is useful to someone, as I've spent quit a bit of time now debugging what was going on.

@aganglada
Copy link
Author

Removing the lockfile entries for the @types/testing-library__* packages and running yarn install should pull in the latest versions. See #620 for more context.

Thank you! I discovered that myself as well. Tried everything till I came up with that.

@eps1lon
Copy link
Member

eps1lon commented Apr 16, 2020

Remove yarn.lock

Don't do that. This might cause cascading issues. Unless you have a solid test suite you should only selectively upgrade your dependencies. Search for the entries that resolve the specific dependency and remove that entry e.g.

79433049-8df23600-7fc4-11ea-9d69-a1d2eb5aa01f

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

2 participants