Mstar0816 / Portfolio

https://my-portfolio-ten-orpin-68.vercel.app
1 stars 0 forks source link

Module error #19

Open Mstar0816 opened 4 months ago

Mstar0816 commented 4 months ago

Module not found: Error: Can't resolve '@mui/x-date-pickers/DateTimePicker' in 'D:\3.Project\2024.03.01\03011\src\Components\Other' ERROR in ./src/Components/Other/Profile.jsx 10:0-76 Module not found: Error: Can't resolve '@mui/x-date-pickers/timeViewRenderers' in 'D:\3.Project\2024.03.01\03011\src\Components\Other'

Mstar0816 commented 4 months ago

It looks like there may be an issue with the imports in your code. The error message indicates that the module @mui/x-date-pickers/DateTimePicker and @mui/x-date-pickers/timeViewRenderers could not be found.

If you are using Material-UI version 5 or newer, the components you are looking for might have been renamed or moved to a different package.

Assuming you are looking for Date and Time picker components in Material-UI version 5, you may need to use components from @mui/lab package instead of @mui/x-date-pickers. Here is how you can update your imports:

import { DateTimePicker } from '@mui/lab/DateTimePicker';
import { timeViewRenderers } from '@mui/lab/timePickerView/timeViewRenderers';

Make sure to install @mui/lab package if you haven't already:

npm install @mui/lab

By using these imports, you should be able to include the Date and Time Picker components in your React component without the import errors.