Closed shakib77 closed 9 months ago
@shakib77 In your snippet, you have repeated the src
prop twice in Avatar
which is probably the cause
<Avatar
alt={'profile image'}
src={'/images/dummy-logo.svg'}
sx={{
width: 'auto',
height: '86px',
'& .MuiAvatar-img': {
objectFit: 'contain',
},
}}
src={vendorProfileData?.org_logo_path} // <---- this looks like the problem 💥
variant={'square'}
/>
Otherwise I cannot reproduce it: https://codesandbox.io/s/https-github-com-mui-material-ui-issues-39796-prm932?file=/src/App.tsx
@shakib77 In your snippet, you have repeated the
src
prop twice inAvatar
which is probably the cause<Avatar alt={'profile image'} src={'/images/dummy-logo.svg'} sx={{ width: 'auto', height: '86px', '& .MuiAvatar-img': { objectFit: 'contain', }, }} src={vendorProfileData?.org_logo_path} // <---- this looks like the problem 💥 variant={'square'} />
Otherwise I cannot reproduce it: https://codesandbox.io/s/https-github-com-mui-material-ui-issues-39796-prm932?file=/src/App.tsx
@mj12albert It is my mistake in Avatar component but I am facing this all over in box component if i add any properties.
@mj12albert It is my mistake in Avatar component but I am facing this all over in box component if i add any properties.
Could you please provide an updated repro? You can fork this template: https://mui.com/r/issue-template-latest
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.
this is legit, just setup new repo, even using new v14 cache provider, I get same:
Expression produces a union type that is too complex to represent.ts(2590)
TS 5.3.3.
It really is legit, I'm also facing it, using ts 5.3.3 and @mui/material: "^5.15.13",
Duplicates
Latest version
Steps to reproduce 🕹
When using @mui/material in the project nextjs with typescript using Box component produces type error:
TS2590: Expression produces a union type that is too complex to represent
Code Example is
Current behavior 😯
This Box component produces
TS2590: Expression produces a union type that is too complex to represent
if add any propertyExpected behavior 🤔
The Box component should not produce type error when properties are added
Context 🔦
Primary solution found is
but my code base is huge. it will take a lot of time to replace components
Your environment 🌎
package.json
tsconfig.json