I am following a tutorial from 10 months back on youtube to create an ecommerce store. I am getting this weird error
TypeError: Cannot read properties of undefined (reading 'up')
It is failing in this styles.js file
import { makeStyles } from '@mui/styles';
import { alpha } from '@mui/material/styles';
const drawerWidth = 0;
export default makeStyles((theme) => ({
appBar: {
boxShadow: 'none',
borderBottom: '1px solid rgba(0, 0, 0, 0.12)',
[theme.breakpoints.up('sm')]: {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: drawerWidth,
},
},
title: {
flexGrow: 1,
alignItems: 'center',
display: 'flex',
textDecoration: 'none',
},
image: {
marginRight: '10px',
},
menuButton: {
marginRight: theme.spacing(2),
[theme.breakpoints.up('sm')]: {
display: 'none',
},
},
grow: {
flexGrow: 1,
},
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginRight: theme.spacing(2),
marginLeft: 0,
width: '100%',
[theme.breakpoints.up('sm')]: {
width: 'auto',
},
},
searchIcon: {
padding: theme.spacing(0, 2),
height: '100%',
position: 'absolute',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
},
inputRoot: {
color: 'inherit',
},
inputInput: {
padding: theme.spacing(1, 1, 1, 0),
// vertical padding + font size from searchIcon
paddingLeft: `calc(1em + ${theme.spacing(4)}px)`,
transition: theme.transitions.create('width'),
width: '100%',
[theme.breakpoints.up('md')]: {
width: '20ch',
},
},
}));
I know that material ui migrated recently and wondering if thats the issue. I exhausted everything on google and there is nohelp. The issue seems to be with breakpoints.
Can someone help?