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';
https://stackoverflow.com/a/69457917/6207266
– Hillsie Commented Oct 5, 2021 at 22:50