likhithkanigolla / zf-dt-frontend

0 stars 1 forks source link

Not able to install @material-ui/core #10

Open likhithkanigolla opened 2 days ago

likhithkanigolla commented 2 days ago

npm i @material-ui/core npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: dt_waternetwork_frontend@0.1.0 npm ERR! Found: react@18.3.1 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 npm ERR! node_modules/@material-ui/core npm ERR! @material-ui/core@"^4.12.4" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! XXXXXXXXXXXXX/.npm/_logs/2024-06-30T09_48_06_855Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: XXXXXXXXXXX/.npm/_logs/2024-06-30T09_48_06_855Z-debug-0.log

likhithkanigolla commented 2 days ago

used the latest version of Material-UI (now called MUI) that is compatible with React 18. The latest version of MUI is designed to work seamlessly with React 18.

likhithkanigolla commented 2 days ago
ERROR in ./src/components/navigation/Navigation.jsx 9:0-99
Module not found: Error: Can't resolve '@mui/icons-material' in 'XXXXXXXXX/src/components/navigation'
ERROR
[eslint] 
src/components/navigation/Navigation.jsx
  Line 28:19:  'makeStyles' is not defined  no-undef

Search for the keywords to learn more about each error.
likhithkanigolla commented 2 days ago

Using makeStyles from @material-ui/core, you can switch to the styled function or the sx prop provided by the new MUI system.