-
Notifications
You must be signed in to change notification settings - Fork 994
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
Type Checking on Typescript project finds errors with an unchanged project #5104
Comments
Thanks @katrinaas! I can reproduce this and the clue is this line here:
It looks like we're getting the type from two places. I looked at the latter ( |
Maybe relevant: facebook/react#24304 So I don't know why we have react-18 types. But the issue here is that in the react 17 types React 17:
React 18:
This is only a problem in RW Apps, not the framework itself. For the framework we still get react 17 typings for both react and react-dom Is it react-syntax-highlighter that's the problem? A few other things worth looking into, from a project's yarn.lock
I found out about the So. Workaround for now: Add this to your project's root
|
If I understand correctly, the problem here is how tsc module resolution is handling the
Is this something that can be handled via tsconfig.json? |
Related Issue now open on DefinitelyTyped repo: |
The equivalent of |
any resolution to this issue? |
@tiff0000 if I recall correctly the original issue was resolved a while ago from
|
Hey @jtoar ! Thanks for the reply, I resolved the issue by upgrading types/react from 17 to 18. |
having the same issue with |
@snurfer0 Can you please be a little bit more specific about exactly what errors you're seeing? |
Expected Behavior
Type checking on a unchanged fresh typescript project to return 0 errors
Current Behavior
Type checking on an unchanged fresh typescript project
returns
Steps to Reproduce
Why this effects things
This doesn't effect me too much right now, as long as it can be ignored and will show other errors in addition to this one, but it is a minor issue if I try to later do CI based on the type-checking.
The text was updated successfully, but these errors were encountered: