Reputation: 369
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
Upvotes: 10
Views: 22517
Reputation: 21
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';
Upvotes: 2
Reputation: 63
Install This :
npm install @mui/styles --legacy-peer-deps
Import This :
import { makeStyles } from '@mui/styles';
Upvotes: 4
Reputation:
makeStyles 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.
Upvotes: 9