score:-1

facing the same issue as well. i was on @material-ui/core ^4.7.1, i just went to experiment and removed lock file and node_modules. then i faced the problem. seems the issue is on @material-ui/styles up to date versions.

solved the problem by reverting updating @material-ui/core to 4.6.1, removed lock file and node_modules, installing packages again.

score:-1

quick workaround: delete the property '.attach()' from dynamicsheet.update(props). not advisable for production envs, however, it's a quick-fix for any local-dev envs.

score:-1

using npm :
1- remove node_modules folder and package-lock.json file
2- open package.json file
3- change or add this under dependencies : "@material-ui/core": "^4.6.1",
4- npm i
solved my problem.

score:1

i am facing the same issue. it occured because i updated @material-ui/core^4.4.0 to @material-ui/core^4.8.1. there maybe breaking changes in the new version or a bug. the latest version has released just four days ago so there might not be a solution yet. but for your problem try downgrading to @material-ui/core^4.4.0 or the previous version of material-ui you were using, it should work. there is no need to rollback to previous commits.

score:1

i think the problem is with jss and the box component in @material-ui/core

until it's fixed, i have installed styled-components and rewrite the box component:

import {
  borders,
  bordersprops,
  display,
  displayprops,
  flexbox,
  flexboxprops,
  palette,
  paletteprops,
  positions,
  positionsprops,
  shadows,
  shadowsprops,
  sizing,
  sizingprops,
  spacing,
  spacingprops,
  typography,
  typographyprops,
} from '@material-ui/system';
import styled from 'styled-components';

/*
 * box with styled-components
 */
export const box = styled.div<
  bordersprops & displayprops & flexboxprops & paletteprops & positionsprops & shadowsprops & sizingprops & spacingprops & typographyprops
>`${borders}${display}${flexbox}${palette}${positions}${shadows}${sizing}${spacing}${typography}`;

score:1

try upgrading material-ui to 4.8.1. if it does not work, add "jss": "10.0.0" to your package.json as a temporary fix.

source: https://github.com/mui-org/material-ui/issues/19005

score:3

in my case it was resolved by removing the box component.

score:6

if you're using yarn like me, then you can solve it by adding a resolutions field to your package.json targeting jss 10.0.0 version.

package.json should look like this:

{

  "dependencies": {
    "@material-ui/core": "^4.8.1",

  },
  "resolutions": {
    "jss": "10.0.0"
  }
}

i shared my solution on github too (and seems it worked for others): https://github.com/mui-org/material-ui/issues/19005#issuecomment-569447204

please accept the answer if it also worked for you too! :)

score:10

adding "jss": "10.0.0" to "dependencies": { } fixed the issue for me

--- updated 30.12.19 ---

"jss" can now be removed,

bug has been fixed in:

"@material-ui/core": "4.8.2",

Related Query

More Query from same tag