I am building an app using Material-UI
, so far so good.
I am trying to build a component using an Accordion
component, but i am getting an error when trying to import it:
Module not found: Can't resolve '@material-ui/core/Accordion' in [path]
I have tried to import it both through a default and named imports, but the result is the same.
the component:
import React from 'react';
// import {
// Accordion,
// AccordionSummary,
// AccordionDetails
// } from '@material-ui/core';
import Accordion from '@material-ui/core/Accordion';
import AccordionSummary from '@material-ui/core/AccordionSummary';
import AccordionDetails from '@material-ui/core/AccordionDetails';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
const JobCard = () => {
return(
<Accordion expanded={true}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
>
test
</AccordionSummary>
<AccordionDetails>
test
</AccordionDetails>
</Accordion>
);
}
export default JobCard;
All my other components are working fine with imported Material-UI components.
Am i missing something here that i am doing wrong? Did anyone encounter such an issue?
@material-ui/core
or restart web-server? :D – Virendra