-
Notifications
You must be signed in to change notification settings - Fork 719
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
Build issue: Expression produces a union type that is too complex to represent #704
Comments
What version of |
I just tried it, but still no luck -- I get the same issue. I've updated the repo with it. |
It looks like the types baked into There are four types that no longer exist in
|
IIRC they're not part of the THREE namespace anymore. They're moved into examples. Could be wrong though. |
Closing since this should be fixed. |
This sis till occurring with the Box component from MUI. |
Encountering the same issue as OP.
When using Button from 'react-bootstrap' I get the following error: Will double-check to make sure it's not related to another one of my dependencies. However, just like OP, a quick search pointed me in this direction. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I'm facing a similar issue but with Chakra UI and spread operator. import { Stack, StackProps } from "@chakra-ui/react";
type Props = { additional: string } & StackProps;
export function CustomStack({ additional, ...stackProps }: Props) {
return <Stack {...stackProps} />;
} This code is ok until importing I guessed extensions of // core/Image.d.ts, for example
declare global {
namespace JSX {
interface IntrinsicElements {
imageMaterial: ImageMaterialType;
}
}
} This worked in my case, though just a temporary workaround. versions:
|
I'm going to lock this issue for now, because realistically as I see it, this is probably a TS compiler problem as we have faced similar issues in |
three
version:"^0.135.0"
@react-three/fiber
version:"^7.0.24",
@react-three/drei
version:"^8.3.1",
node
version: n/ayarn
) version:1.21.1
Problem description:
Using
drei
somehow interferes with components defined in other libraries in production builds (Type error: Expression produces a union type that is too complex to represent.
). The library works fine in development builds.Relevant code:
I have created a repo that replicates the issue here
Steps to reproduce:
The code in the repo is mostly generated by the nextjs tool. The modifications are all in the index file shown below:
Suggested solution:
I'm not sure what's going on here. However, I believe that the issue is related to
drei
and notreact-bootstrap
because after doing some searching I've found similar issues reported from people using other UI frameworks withdrei
. ExampleThe text was updated successfully, but these errors were encountered: