i install material ui@next and i have this error in node modules.
ERROR in [at-loader] ./node_modules/material-ui/Avatar/Avatar.d.ts:8:15
11:31:52 web.1   |      TS2315: Type 'ReactType' is not generic.
11:31:52 web.1   |  ERROR in [at-loader] ./node_modules/material-ui/Button/Button.d.ts:7:15
11:31:52 web.1   |      TS2315: Type 'ReactType' is not generic.
11:31:52 web.1   |  ERROR in [at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:10:15
11:31:52 web.1   |  webpack: Failed to compile.
Do an npm update @types/react.
In the latest version ReactType is generic
I fixed this by deleting my node_modules folder and my yarn.lock file and then reinstalling modules with yarn (or npm i).
After reinstalling I had a newer version of react and @types/react, which fixes this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With