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.
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",
Source: stackoverflow.com
Related Query
- TypeError when using React: Cannot read property 'firstChild' of undefined
- Material-UI makeStyles cannot read property 'down' of undefined
- TypeError Cannot read property 'price' of undefined
- Gatsby TypeError - Cannot read property 'id' of undefined
- TypeError cannot read property url of undefined on strapi
- React-Redux mapStateToProps TypeError Cannot read property '' of undefined
- TypeError Cannot read property 'find' of undefined
- React Facebook Login with Enzyme mount - TypeError cannot read property 'parentNode' of undefined
- TypeError Cannot read property 'baseTheme' of undefined
- React : TypeError : Cannot read property 'fullname' of undefined
- React js and apexcharts Unhandled Rejection TypeError Cannot read property 'length' of undefined
- React - uncaught TypeError: Cannot read property 'setState' of undefined
- Line 0: Parsing error: Cannot read property 'map' of undefined
- react router v^4.0.0 Uncaught TypeError: Cannot read property 'location' of undefined
- Error : Cannot read property 'map' of undefined
- React with ES7: Uncaught TypeError: Cannot read property 'state' of undefined
- Uncaught TypeError: Cannot read property 'push' of undefined (React-Router-Dom)
- React enzyme testing, Cannot read property 'have' of undefined
- Cannot read property 'history' of undefined (useHistory hook of React Router 5)
- React - TypeError: Cannot read property 'props' of undefined
- React-Router - Uncaught TypeError: Cannot read property 'getCurrentLocation' of undefined
- Redux TypeError: Cannot read property 'apply' of undefined
- React Router: Cannot read property 'pathname' of undefined
- React Typescript: Line 0: Parsing error: Cannot read property 'name' of undefined
- reactjs Cannot read property 'keys' of undefined
- TypeError: Cannot read property 'contextTypes' of undefined
- TypeError: Cannot read property 'prepareStyles' of undefined
- Cannot read property '.then' of undefined when testing async action creators with redux and react
- Cannot read property ‘params’ of undefined (React Router 4)
- Cannot read property 'string' of undefined | React.PropTypes | LayoutPropTypes.js
More Query from same tag
- React - simple ul li filter
- Custom react dropdown component re-rendering on every user input
- Reactjs and localization
- Firebase onDisconnect not deleting user name on disconnection
- Remove "TODO" with redux
- How to store the data in React state after Querying it from GraphQL?
- How to add https:// in url when input value with http:// or "a.com" onBlur event reactjs
- MobX: Update value in input field
- React API Reference
- How to rename Object Keys & change Object values from string to number
- Cleaning up after AJAX function in custom React hook
- Detect React/ReactDOM development/production build
- React: Setting state to an array based on textarea input
- React axios failed to compile
- Looping through Laravel validation errors dynamic object in Reactjs
- NextJS: Use same component in multiple routes for multiple pages
- ReactJs render doesn't update properly on data change
- EJS Template for webpack plugin 'html-webpack-plugin'
- React componentDidMount and setState not seeming to cause a rerender to show my component
- Express + React | Googleapis - download a file
- Append child element in full calendar api using eventRender?
- How will i install react properly in my local
- How to fix 'Each child in a list should have a unique "key" prop.'
- ComponentSearch with submit button
- How to use NextJS Component level CSS
- Component not updating on state change with React Router
- P tag from one page in React site not showing despite same code/working in the rest
- React: how can I filter the state based on a property without mutating the state?
- Change child's state in react
- Syntax error when using conditional rendering with prop of object