I am trying to use the icon 'ContentCopy' from MUI.
https://mui.com/components/material-icons/ says to use the following import:
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
No matter what I do, I get the error:
Module not found: Can't resolve '@mui/icons-material/
I have already tried the following:
npm install @material-ui/core
npm install @material-ui/icons
I also tried deleting my node-modules and re-running npm install.
Any ideas on what else I could try??
It seems that you confused of using version 4 and 5.
You need to install the icons of version 5.
npm install @mui/icons-material
And import the icon from the module.
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
Please refer to this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With