I don't know whats wrong with MUI but yesterday I was working on my project and makeStyles worked now all of a sudden doesn't work anymore. I get error here where I call it:
I think the import has something to do with it
import { makeStyles } from "@mui/material";
I looked on the internet it said to switch material with styles and that doesn't exist.
Please help i don't know what to do i have to finish this project fast
I am expecting the app not to crash and to have my styles applied
CodePudding user response:
Possible solutions:
- Delete
node_modules
folder - Delete
package-lock.json
oryarn.lock
file - run
npm
oryarn
install - restart idle
- and also make sure that you have imported
makeStyles
correctly:
import { makeStyles, createStyles } from '@mui/styles';