-
Notifications
You must be signed in to change notification settings - Fork 233
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/react@17 installed #610
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/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
└─ [email protected]
info All dependencies
├─ @testing-library/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨ Done in 1.71s.
❯ yarn list --pattern "@types/react"
yarn list v1.22.10
├─ @testing-library/[email protected]
│ ├─ @types/[email protected]
│ ├─ @types/[email protected]
│ └─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
└─ @types/[email protected]
✨ 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.
+ [email protected]
+ @types/[email protected]
+ @types/[email protected]
+ @testing-library/[email protected]
+ @types/[email protected]
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/[email protected]
├── @types/[email protected]
├─┬ @types/[email protected]
│ └── @types/[email protected] deduped
└─┬ @types/[email protected]
└── @types/[email protected] 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/[email protected]
, 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: [email protected]Yarn 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: