On one of my React project, I'm using Material-UI icons with those info in my package.json
"@material-ui/core": "^4.9.10",
"@material-ui/icons": "^4.5.1",
All icons are working fine until I added the icon ContentCut
which is availabe at this link:
this is how I'm importing it:
import ContentCutIcon from '@material-ui/icons/ContentCut';
but I get the error:
Module not found: Can't resolve '@material-ui/icons/ContentCut'
I tried by upgrading the icons package using yarn:
yarn upgrade @material-ui/core --latest
yarn upgrade @material-ui/icons --latest
but it does not solve the problem.
I created this codesandbox with the fixed latest version of @material-ui/icons
which is today v1.4.9 as described on the npm project page to illustrate the problem (comment the ContentCut
import line to see the error).
Does anyone solved this specific issue (when the icon is available but the import is not possible even after an npm/yarn upgrade)?