creativetimofficial / ct-material-dashboard-pro

Material Dashboard Pro - Premium Bootstrap 5 Admin
https://demos.creative-tim.com/material-dashboard-pro/pages/dashboards/analytics
116 stars 28 forks source link

Error: Could not resolve dependency (error occurring after npm install and yarn install) #330

Closed gabbewg closed 2 years ago

gabbewg commented 2 years ago

Reproduction link

https://github.com/creativetimofficial/material-dashboard

Operating System

MacOs

Device

MacBook Pro m1 2020

This resembles an already closed issue, which I am yet again opening since the answers weren't sufficient for me to solve it.

The problem is that when I run npm install or for that matter yarn install as was suggested in the closed issue, I do not install all local dependencies. Instead, I get the following error:

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @mui/material@5.2.0 npm ERR! Found: @emotion/react@11.4.1 npm ERR! node_modules/@emotion/react npm ERR! @emotion/react@"11.4.1" from the root project npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.3.0 npm ERR! node_modules/@emotion/styled npm ERR! @emotion/styled@"11.3.0" from the root project npm ERR! peerOptional @emotion/styled@"^11.3.0" from @mui/material@5.2.0 npm ERR! node_modules/@mui/material npm ERR! @mui/material@"5.2.0" from the root project npm ERR! 1 more (@mui/icons-material) npm ERR! 1 more (@mui/styled-engine) npm ERR! 1 more (@mui/styled-engine) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional @emotion/react@"^11.5.0" from @mui/material@5.2.0 npm ERR! node_modules/@mui/material npm ERR! @mui/material@"5.2.0" from the root project npm ERR! peer @mui/material@"^5.0.0" from @mui/icons-material@5.2.0 npm ERR! node_modules/@mui/icons-material npm ERR! @mui/icons-material@"5.2.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: @emotion/react@11.7.1 npm ERR! node_modules/@emotion/react npm ERR! peerOptional @emotion/react@"^11.5.0" from @mui/material@5.2.0 npm ERR! node_modules/@mui/material npm ERR! @mui/material@"5.2.0" from the root project npm ERR! peer @mui/material@"^5.0.0" from @mui/icons-material@5.2.0 npm ERR! node_modules/@mui/icons-material npm ERR! @mui/icons-material@"5.2.0" 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.

I have been staring on this all day, and do not know what to do.

As stated above, the solutions in the former issue were insufficient as both yarn install and npm install produce the exact same error. Worth noting that I am also using the recommended version of node.

github-actions[bot] commented 2 years ago

@gabbewg this issue was automatically closed because it did not follow the bellow rules:


IMPORTANT: Please use the following link to create a new issue:

https://www.creative-tim.com/new-issue/material-dashboard-pro

**If your issue was not created using the app above, it will be closed immediately.**

Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com