-
Notifications
You must be signed in to change notification settings - Fork 60
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
New version of @types/react causing type errors with a new yarn.lock #153
Comments
Looks like this is the issue: facebook/react#24304 |
I ran into this the other day, too |
This is a good explainer of what's going on facebook/react#24304 (comment) |
Closing—we're going with the |
Yeah, sorry we can't offer anything better, I think resolutions are the best any kind of project generator can do if they want to output a React 17-supporting TypeScript project :( |
@lemonmade No worries, I don't think this issue is fixable from within |
Hey remote-ui team 👋. This issue is going to look very similar to #151, but it's brand new as of last night.
TL;DR: Type checking is broken in this repository with a fresh
yarn.lock
file because of a new version of@types/react
.Steps to reproduce:
tsc
reports many errors of this type:Yesterday (April 7) version 18.0.0 of
@react/types
was published to NPM. The@types/react-reconciler
package (for all versions) requests"@types/react": "*"
, so as soon as the new version came out it started pulling it in for new installs. Here's what the dependency tree looks like:You can see that
react-reconciler
has it's own version of@types/react
pinned to version 18.remote-ui
does not support React 18 yet, so the mismatch in types causes the errors. I'm not familiar with how those type libraries get generated on DefinitelyTyped and I don't have a great solution to this at the moment. We're advising our developers to add aresolutions
property to theirpackage.json
files as a workaround:I'm continuing my research, but let me know if you have an idea how we can solve this one. Thanks!
The text was updated successfully, but these errors were encountered: