admin管理员组文章数量:1208155
makeStyles is not longer exported from @mui/material/styles.
Even I am importing from @mui/styles
all over in my project but still it is showing this error.
I removed node_modules
and reinstalled but not working
makeStyles is not longer exported from @mui/material/styles.
Even I am importing from @mui/styles
all over in my project but still it is showing this error.
I removed node_modules
and reinstalled but not working
3 Answers
Reset to default 9makeStyles is not longer exported from @mui/material/styles. It is now export from @mui/styles.
Here:
Install: npm install @mui/styles
Then Import: import { makeStyles } from '@mui/styles';
I hope it mix your problem but if not please tell me in the comment.
Install This :
npm install @mui/styles --legacy-peer-deps
Import This :
import { makeStyles } from '@mui/styles';
I had this same issue (with withStyles instead) after I thought I replaced all the imports correctly. Turns out there were still things imported like...
import { withStyles, TableCell, TableBody } from '@mui/material';
So just make sure to search for "withStyles," and/or "withStyles }" in your code editor and ensure you have updated all the imports for withStyles correctly like...
import { withStyles } from '@mui/styles';
本文标签:
版权声明:本文标题:javascript - Uncaught Error: Material UI: makeStyles is not longer exported from @muimaterialstyles - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738729790a2109255.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
https://stackoverflow.com/a/69457917/6207266
– Hillsie Commented Oct 5, 2021 at 22:50