devias-io / material-kit-react

React Dashboard made with Material UI’s components. Our pro template contains features like TypeScript version, authentication system with Firebase and Auth0 plus many other
http://material-kit-react.devias.io
MIT License
5.37k stars 2.46k forks source link

running error #130

Closed bassem97 closed 2 years ago

bassem97 commented 2 years ago

getting blank page when running

ionut-becheru commented 2 years ago

Can I see the console messages?

adrianmanea commented 2 years ago

Can you try rm -rf node_modules and reinstall using npm install instead of yarn? We are aware of some issues with yarn.

swhamilton commented 2 years ago

The blank screen is due to a change in @mui/lab and utils.date is no longer a function in the LocalizationProvider.

To get it working with yarn using latest @mui/x-date-pickers packages, do the following:

Run these commands: rm -rf node_modules && rm package-lock.json && yarn remove @mui/lab yarn add @mui/x-date-pickers && yarn

Modify _app.js:

// old:
import LocalizationProvider from '@mui/lab/LocalizationProvider';
import AdapterDateFns from '@mui/lab/AdapterDateFns';

// new:
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";

Then run yarn dev and it should build/load successfully.