npm install fails with errors resolving packages. Running npx ncu -u converts errors to warnings but then the code doesn't work. Please update the project.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @material-ui/core@4.12.4
npm error Found: @types/react@18.0.21
npm error node_modules/@types/react
npm error @types/react@"^18.0.14" from the root project
npm error peerOptional @types/react@"*" from @material-ui/types@5.1.0
npm error node_modules/@material-ui/types
npm error @material-ui/types@"5.1.0" from @material-ui/core@4.12.4
npm error node_modules/@material-ui/core
npm error @material-ui/core@"^4.12.4" from the root project
npm error 1 more (@material-ui/icons)
npm error @material-ui/types@"5.1.0" from @material-ui/styles@4.11.5
npm error node_modules/@material-ui/styles
npm error @material-ui/styles@"^4.11.5" from @material-ui/core@4.12.4
npm error node_modules/@material-ui/core
npm error @material-ui/core@"^4.12.4" from the root project
npm error 1 more (@material-ui/icons)
npm error 13 more (@mui/base, @mui/icons-material, @mui/material, ...)
npm error
npm error Could not resolve dependency:
npm error peerOptional @types/react@"^16.8.6 || ^17.0.0" from @material-ui/core@4.12.4
npm error node_modules/@material-ui/core
npm error @material-ui/core@"^4.12.4" from the root project
npm error peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
npm error node_modules/@material-ui/icons
npm error @material-ui/icons@"^4.11.3" from the root project
npm error
npm error Conflicting peer dependency: @types/react@17.0.89
npm error node_modules/@types/react
npm error peerOptional @types/react@"^16.8.6 || ^17.0.0" from @material-ui/core@4.12.4
npm error node_modules/@material-ui/core
npm error @material-ui/core@"^4.12.4" from the root project
npm error peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
npm error node_modules/@material-ui/icons
npm error @material-ui/icons@"^4.11.3" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/potucek/.npm/_logs/2025-10-25T21_28_11_270Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/potucek/.npm/_logs/2025-10-25T21_28_11_270Z-debug-0.log
npm install fails with errors resolving packages. Running
npx ncu -uconverts errors to warnings but then the code doesn't work. Please update the project.