Material-UI Accordion (formerly ExpansionTable) component won't import Material-UI Accordion (formerly ExpansionTable) component won't import reactjs reactjs

Material-UI Accordion (formerly ExpansionTable) component won't import


ExpansionPanel has been renamed to Accordion . With your error, it looks like you are using material-ui-core version 4.10.2 (or below).

Use material-ui-core version 4.11.0 or higher.

Working demo of your code in codesandbox


Install Material UI Core

npm i @material-ui/core

So , it will be @material-ui/core@4.11.0

Then, its working. Have fun!!


I had basically the same issue. Error was:

"Can't resolve '@material-ui/icons/ExpandMore'"

After installing the following:

"@material-ui/core": "^4.11.0","@material-ui/icons": "^4.9.1","avatar": "^0.1.0","clsx": "^1.1.1","jquery": "^3.5.1","material-ui": "^0.20.2","react": "^16.14.0","react-dom": "^16.14.0","react-ga": "^2.7.0","react-scripts": "1.0.17"

I ran npm update and ALL WAS GOOD :)