Dependency resolution issue between react versions in example project.
The issue involves dependency conflicts when running the with-mdbreact example, specifically between react versions required by mdbreact and material-ui. The problem appears reproducible but may require Windows-specific troubleshooting. The main blocker is unclear if this is an example configuration issue or a broader dependency management problem.
with-mdbreact-app
10.2.0
15.8.0
Firefox
Windows 10
create-next-app
Whenever i try to run the example of mdbreact using npx create-next-app --example with-mdbreact with-mdbreact-app,
i receive the following output:
Creating a new Next.js app in D:\Users\Win10\Desktop\Visual Studio\Visual Studio Code\Projects\Testings\test-nextjs\with-mdbreact-app.
Downloading files for example with-mdbreact. This might take a moment.
Installing packages. This might take a couple of minutes.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"17.0.1" from the root project
npm ERR! peer react@"*" from [email protected]
npm ERR! node_modules/mdbreact
npm ERR! mdbreact@"^5.0.0" from the root project
npm ERR! 2 more (react-dom, next)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from @material-ui/[email protected]
npm ERR! node_modules/mdbreact/node_modules/@material-ui/core
npm ERR! @material-ui/core@"3.9.3" from [email protected]
npm ERR! node_modules/mdbreact
npm ERR! mdbreact@"^5.0.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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Win10\AppData\Local\npm-cache\_logs\2021-05-09T06_32_12_044Z-debug.log
Aborting installation.
npm install --loglevel error has failed.
It should just install the dependencies i guess with no errors.
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!