Environment: SPFx with Office 365
I have created a SPFx solution with 1.8 as @microsoft/sharepoint version. I am trying to utilize material UI. so I have installed npm install @material-ui/core
into my SPFx solution. I have added references to my .tsx file as
import { createStyles, makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
In render method i just simple written as
return (
<div>
<Card></Card>
</div>
);
In browser console I am getting errors as below:
I thought because of materilUI has react version dependency i have updated them to latest. My package.json file looks below
Now I executed the gulp serve
where I am getting below is error in console
What is the resolution for this. I am trying to resolve this from 8hrs. I am not finding anyway. Please suggest me are there any dependencies that I need to install in the solution?