Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Module not found: Can't resolve '@mui/icons-material/Polyline'

I am trying to use this material ui icon in react. It has been imported as follows:

import PolylineIcon from '@mui/icons-material/Polyline';
.
.
return (<PolylineIcon className={classes.icon} />); // Module not found: Can't resolve '@mui/icons-material/Polyline'

But I get the aforementioned error and npm fails to compile. What’s the problem here? Knowing that I am using other icons smoothly with no errors; such as:

import EditIcon from '@mui/icons-material/Edit';
.
.
.
return (<EditIcon className={classes.icon} />); //works fine

This compiles fine, so @mui/icons-material module is indeed installed and works.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Dependencies from package.json:

    "@mui/icons-material": "^5.0.1",
    "@mui/material": "^5.0.2",

Thanks in advance

>Solution :

The polyline icon was added later. Update your @mui/icons-material to ^5.2.5.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading