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

i install the ui @next stuff 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.

+4
source share
2 answers

Do it npm update @types/react. The latest version of ReactType is generic

+2
source

I fixed this by deleting the folder node_modulesand mine yarn.lock, and then reinstalling the modules with yarn(or npm i).

After reinstalling, I got a newer version of the reaction and @ types / response, which fixes this problem.

+2
source

Source: https://habr.com/ru/post/1691871/


All Articles