version conflict between dependencies (`vite` and `@vitejs/plugin-react)
Tonny2wo6ix5ive opened this issue · comments
Description
Encountering a dependency resolution error when trying to install project dependencies. The issue arises due to a version conflict between vite
and @vitejs/plugin-react
.
Error Message
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: @lidojs/source@0.0.0 npm ERR! Found: vite@5.2.9 npm ERR! node_modules/vite npm ERR! dev vite@“5.2.9” from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vite@“^4.2.0” from @vitejs/plugin-react@4.0.4 npm ERR! node_modules/@vitejs/plugin-react npm ERR! dev @vitejs/plugin-react@“~4.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! npm ERR! See C:\Users\USER\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Local\npm-cache_logs\2024-04-17T08_28_56_284Z-debug-0.log
Steps to Reproduce
- Clone the repository from https://github.com/lidojs/canva-clone/
- Run
npm install
to install the dependencies. - Encounter the ERESOLVE error due to version conflicts.
Environment
- Node version: v18.4.0
- npm version: 8.13.2
- OS: Windows 10
Additional Context
Attempting to resolve the issue by updating vite
to the latest version resulted in a new version conflict with @vitejs/plugin-react
. The error persists despite trying to fix the upstream dependency conflict as suggested by npm.