Answers for "Can't resolve '@material-ui/icons'"

9

Module not found: Can't resolve '@material-ui/icons/Menu'

You need to install Icons
Yarn add @material-ui/icons
npm install @material-ui/icons
Posted by: Guest on November-17-2020
0

Can't resolve '@mui/icons-material/'

Icons are not part of material-ui/core so it must be install using two commands.

If you are using npm

npm install @material-ui/core
npm install @material-ui/icons

if that doesn't work

Change the import path from @mui/icons-material/ to @material-ui/icons/

This is not a 100% working solution,
as there have been icons I have yet to be able to import
(e.g. ConnectWithoutContact)
Regardless, this change has saved me several times so here is an example:

// Initial
import StarRateRoundedIcon from "@mui/icons-material/StarRateRounded";

// Fixed
import StarRateRoundedIcon from "@material-ui/icons/StarRateRounded";
Posted by: Guest on November-03-2021

Code answers related to "Can't resolve '@material-ui/icons'"

Browse Popular Code Answers by Language