Material UI v5: TypeError: Cannot read properties of undefined (reading ‘create’)

Just ran into this myself. You can import createTheme from @mui/material/styles or @mui/system, but they do slightly different things:

You can use the utility coming from the @mui/system package, or if you are using @mui/material, you can import it from @mui/material/styles. The difference is in the default theme that is used (if no theme is available in the React context).

The one from @mui/material/styles is smart enough to fill in gaps in the active theme from the default MUI theme. So if you’re using @mui/material, then use @mui/material/styles.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)