Skip to content
Advertisement

Module not found: Can’t resolve ‘@mui/icons-material/FileDownload’

I have installed both @material-ui/core and @material-ui/icons.

I am trying to import “FileDownloadIcon” from Material icons.

Installing “@material-ui/core”:

JavaScript

Installing “@material-ui/icons”:

JavaScript

This is the way I am trying to import “FileDownloadIcon”:

JavaScript

But it’s occurring error like this “Module not found: Can’t resolve ‘@mui/icons-material/FileDownload’ in ‘E:frontendsrccomponentDetails'”

Can anyone tell me where is the problem?

Advertisement

Answer

FileDownload icon is added in v5, it does not exist in v4. You can search for v4 icons here. To use the v5 icon in the older version of MUI, just go and copy the source code here:

JavaScript

EDIT: If you are using MUI v5 already, it means you’re missing the icon package. Follow the installation guide here to install:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement