material-ui: [LoadingButton] LoadingButtonProps freezes typescript compilation on "Checking validity for types"
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
The LoadingButtonProps freezes typescript compilation. The build remains stuck on “Checking validity of types”. Using the ButtonProps interface temporarily solves the issue.
The issue is described in detail here
Expected behavior 🤔
Typescript should compile fine to javascript files.
Steps to reproduce 🕹
Steps:
- create a next js project with typescript and install mui
- create a LoadingButton component and the props for it should extend the LoadingButtonProps.
- render the component and run next build
- the terminal should be stuck on “Checking validity of types…”
Context 🔦
Was unable to use LoadingButton props which caused a build failure. I had to use ButtonProps instead which produced the build
Your environment 🌎
`npx @mui/envinfo`
System:
OS: Linux 5.10 Manjaro Linux
Binaries:
Node: 16.11.0 - /usr/bin/node
Yarn: 1.22.10 - /usr/bin/yarn
npm: 8.0.0 - /usr/bin/npm
Browsers:
Chrome: Not Found
Firefox: 94.0.1
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 11
- Comments: 22 (2 by maintainers)
What information is missing here? The bug is clear, and has been corroborated by multiple people.
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.
@mbrookes Why was this closed? The above suggestion is only a workaround. It should be possible to use
LoadingButtonPropswithout tsc hanging.just got bit by this, too.
trying to do this:
causes
tsc --noEmit --project ./my/projectto hang indefinitely.replacing the type import with a custom one using
ButtonProps:allows
tscto finish successfully.tscappears to spend a lot of time in:inferFromIndexTypes()andgetUnionType():Yes, this is what I ended up doing as well.
I’ve been struggling with this issue too.
tsccheck types end up in heap out of memory. VSCode Intellisense also gets stuck on loading."yarn@3.3.1"- node_modules (not zero-installs)facing the same problem when start to using yarn 2 pnp