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.
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.