cybernetisk / internsystem-v2

A NextJS-based website. Used for public information about Cybernetisk Selskab, and necessary tools for volunteers at the bar/café Escape.
https://cyb.no
MIT License
7 stars 7 forks source link

”Could not resolve dependency“ #36

Closed ubesluttsom closed 1 month ago

ubesluttsom commented 2 months ago

Describe the bug Installing dependencies for the system fail.

To Reproduce Steps to reproduce the behavior:

  1. Clone repo.
  2. Do npm install

Expected behavior npm install should install all dependencies.

Error log

~/P/internsystem-v2 main ❱ npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: internsystem_v2@0.1.0
npm error Found: @mui/system@5.15.9
npm error node_modules/@mui/system
npm error   @mui/system@"^5.15.9" from @mui/material@5.15.10
npm error   node_modules/@mui/material
npm error     @mui/material@"^5.15.6" from the root project
npm error     peer @mui/material@"^5.0.0" from @mui/icons-material@5.15.10
npm error     node_modules/@mui/icons-material
npm error       @mui/icons-material@"^5.15.6" from the root project
npm error
npm error Could not resolve dependency:
npm error @mui/x-date-pickers@"^7.9.0" from the root project
npm error
npm error Conflicting peer dependency: @mui/system@6.0.2
npm error node_modules/@mui/system
npm error   peer @mui/system@"^5.15.14 || ^6.0.0" from @mui/x-date-pickers@7.16.0
npm error   node_modules/@mui/x-date-pickers
npm error     @mui/x-date-pickers@"^7.9.0" 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/martin/.cache/npm/_logs/2024-09-08T19_01_49_293Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/martin/.cache/npm/_logs/2024-09-08T19_01_49_293Z-debug-0.log

However, running npm install --legacy-peer-deps seems to work, but this is probably not an ideal fix.

yrjarv commented 1 month ago

npm install --force also works, but as you said it's not ideal

pvk05 commented 1 month ago

Looked like mui/system was missing, so i did npm install @mui/system@5.16.7. It worked but i got 7 vulnerabilities. Running npm audit fix fixes all but one vulnerability.

EricSvebakk commented 1 month ago

The dependencies have been set to the following on the main branch:

Other branches are expected to use the same version.