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
Using Box from MUI cause error #823
Comments
|
Same thing here. This is not great for MUI users. |
|
Do you have an idea of what's causing this problem? From the stack overflow it looks like removing some random d files "solves it", but it's not clear to me why those specific files would be a problem. I don't get why ts would fail to correctly guess the type of Box since both would be imported and not parts of global namespace overrides @joshuaellis @CodyJasonBennett ideas? |
|
This pretty clearly sounds like a larger issue with TypeScript although I'd be interested in potential workarounds regarding the Box component. |
|
Some insight into why TS produces this error can be found here: microsoft/TypeScript#33130 |
|
I've seen this issue in projects that don't use drei. I was able to solve it by specifying the |
After adding the component "drei" to my existing project, every occurrence of Box from Material UI (mui.com) produce this error:
Expression produces a union type that is too complex to represent. TS2590Adding this completely redundant property to every single Box in the whole project solve it somehow:
component='div'https://stackoverflow.com/questions/68692230
But this workaround is very ugly.
Similar issue reported here:
#704 (comment)_
The text was updated successfully, but these errors were encountered: