-
Notifications
You must be signed in to change notification settings - Fork 232
@types/react@17 installed #610
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
Comments
Hi @thoughtspile, I'm not sure how much control we're going to have over this one, but there seems to be difference between how ❯ yarn add react@^16.9 @types/react@^16.9 @types/react-dom@^16.9 @types/react-test-renderer@^16.9 @testing-library/react-hooks@^5.1
yarn add v1.22.10
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 11 new dependencies.
info Direct dependencies
├─ @testing-library/react-hooks@5.1.2
├─ @types/react-dom@16.9.12
├─ @types/react-test-renderer@16.9.5
└─ react@16.14.0
info All dependencies
├─ @testing-library/react-hooks@5.1.2
├─ @types/react-dom@16.9.12
├─ @types/react-test-renderer@16.9.5
├─ filter-console@0.1.1
├─ js-tokens@4.0.0
├─ loose-envify@1.4.0
├─ prop-types@15.7.2
├─ react-error-boundary@3.1.1
├─ react-is@16.13.1
├─ react@16.14.0
└─ regenerator-runtime@0.13.7
✨ Done in 1.71s.
❯ yarn list --pattern "@types/react"
yarn list v1.22.10
├─ @testing-library/react-hooks@5.1.2
│ ├─ @types/react-dom@17.0.3
│ ├─ @types/react-test-renderer@17.0.1
│ └─ @types/react@17.0.4
├─ @types/react-dom@16.9.12
├─ @types/react-test-renderer@16.9.5
└─ @types/react@16.14.5
✨ Done in 0.06s. vs. ❯ npm i react@^16.9 @types/react@^16.9 @types/react-dom@^16.9 @types/react-test-renderer@^16.9 @testing-library/react-hooks@^5.1
npm notice created a lockfile as package-lock.json. You should commit this file.
+ react@16.14.0
+ @types/react-test-renderer@16.9.5
+ @types/react-dom@16.9.12
+ @testing-library/react-hooks@5.1.2
+ @types/react@16.14.5
added 17 packages from 41 contributors and audited 18 packages in 1.193s
found 0 vulnerabilities
❯ npm ls @types/react
/Users/michaelpeyper/delete_me
└─┬ @testing-library/react-hooks@5.1.2
├── @types/react@16.14.5
├─┬ @types/react-dom@16.9.12
│ └── @types/react@16.14.5 deduped
└─┬ @types/react-test-renderer@16.9.5
└── @types/react@16.14.5 deduped It seems this is a known issue when resolving types with ranges but the |
I'll close this now, but please feel free to continue the discussion if you want. |
Thanks @mpeyper :-) |
I'm not quite sure what happens, but despite
@types/react: >=16.9.0
in RTL that should hoist to our@types/react@16.9.29
, version17.0.4
is installed innode_modules/@testing-library/react-hooks/node_modules/@types/react
and ambient types explode.react-hooks-testing-library
version: 5.1.2react
version: 16.9yarn
version: yarn@1.22.0Yarn why output:
Suggested solution:
I've seen things like
"@types/react": "^16.9.34 || ^17.0.0"
, but I'm not sure what the effect is (or if it works at all).As a workaround:
The text was updated successfully, but these errors were encountered: