Home > OS >  makeStyles is throwing error when i call it
makeStyles is throwing error when i call it

Time:11-03

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: enter image description here

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. enter image description here

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:

  1. Delete node_modules folder
  2. Delete package-lock.json or yarn.lock file
  3. run npm or yarn install
  4. restart idle
  5. and also make sure that you have imported makeStyles correctly:

import { makeStyles, createStyles } from '@mui/styles';

  • Related