'MenuIcon not found in MUI
I'm trying to implement a appbar from mui which is include a MenuIcon. I've tried import MenuIcon from '@mui/icons-material/Menu';
from mui documentation. But it is still showing not found. so I was hoping someone could tell me what I'm missing. Thanks in advance!
Solution 1:[1]
This error occurs if you installed package with MUI icons before you installed MUI component library. Run this command:
npm install @mui/material @emotion/react @emotion/styled
and it should help.
Solution 2:[2]
I think your path should be like this:
import MenuIcon from '@mui/material/MenuIcon';
Solution 3:[3]
with npm:
npm install @mui/icons-material
or with yarn:
yarn add @mui/icons-material
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Wojtek |
Solution 2 | wildgamer |
Solution 3 | Xavier Guihot |