Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Type 'ReactType' is not generic (material-ui@next)

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.

like image 890
Gerard López Sorribas Avatar asked Jan 08 '18 10:01

Gerard López Sorribas


2 Answers

Do an npm update @types/react. In the latest version ReactType is generic

like image 174
colivier Avatar answered Sep 20 '22 18:09

colivier


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.

like image 24
justinschuldt Avatar answered Sep 21 '22 18:09

justinschuldt