-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TS2590: Expression produces a union type that is too complex to represent - (TS v5.0) #52459
Comments
Hi @dhruvkelawala, could you share a repro as a project, or at least the tsconfig and dependency versions you used? I tried to repro this error with both examples provided, but I get a different error on |
Hey, this is the file. It's a monorepo and quite a big project. But I hope you get what you are looking for. Otherwise, I can create a new project and try to reproduce it. Thanks Note: It's still using |
@gabritto You got everything you need? Otherwise I'll work on a repro. |
I think I ran into this same issue today. Luckily the project I’m working on is small, so I could just convert from TS to JS. 😭 I’ll post a simplified repro if there is interest. In my case, I was trying to use a Button from react-bootstrap. EDIT: After more sleuthing I’m guessing my actual issue is when I added three-js/drei. See issue pmndrs/drei#704 |
Converting from TS to js seems quite excessive, can't you just use |
Maybe?
I write C++ professionally and am playing with JS for fun, so I kind of
unstuck myself the nuclear way once I ran out of tips from the internet...
…On Sun, Dec 24, 2023 at 2:34 AM Ennio Visconti ***@***.***> wrote:
I think I ran into this same issue today. Luckily the project I’m working
on is small, so I could just convert from TS to JS. 😭
I’ll post a simplified repro if there is interest. In my case, I was
trying to use a Button from react-bootstrap.
EDIT: After more sleuthing I’m guessing my actual issue is when I added
three-js/drei. See issue pmndrs/drei#704
<pmndrs/drei#704>
Converting from TS to js seems quite excessive, can't you just use any in
that case?
—
Reply to this email directly, view it on GitHub
<#52459 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6WAHZJ4IOVJULYHULUICDYK7LJZAVCNFSM6AAAAAAUIV2A5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGQ2TGMBWGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Update: I didn't realize how to get // @ts-ignore to be found in JSX.... Once I figured that out, I was able to just ignore the one line. |
🔎 Search Terms
TS2590: Expression produces a union type that is too complex to represent
🕗 Version & Regression Information
💻 Code
Simplified Version
Actual Version
🙁 Actual behavior
On both of the versions, typescript throws similar error:
🙂 Expected behavior
This is a very simple JSX.Element. It worked fine with typescript 4.9.4 but our project needed the latest
moduleResolution: "bundler"
support for some of the dependencies.External Dependencies
"@chakra-ui/react": 2.9.4 - also tried 2.7.4
The text was updated successfully, but these errors were encountered: