hotgo icon indicating copy to clipboard operation
hotgo copied to clipboard

前端代码依赖冲突

Open wohenbushuang opened this issue 1 year ago • 2 comments

root ➜ /workspaces/web $ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vitejs/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^4.2.7" from the root project
npm ERR!   peer vite@">=2.0.0" from [email protected]
npm ERR!   node_modules/vite-plugin-compression
npm ERR!     dev vite-plugin-compression@"^0.5.1" from the root project
npm ERR!   4 more (vite-plugin-html, vite-plugin-style-import, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^3.0.0" from @vitejs/[email protected]
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR!   dev @vitejs/plugin-vue@"^3.2.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vite
npm ERR!   peer vite@"^3.0.0" from @vitejs/[email protected]
npm ERR!   node_modules/@vitejs/plugin-vue
npm ERR!     dev @vitejs/plugin-vue@"^3.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.

wohenbushuang avatar Feb 24 '24 18:02 wohenbushuang

npm install -g yarn yarn install

zlaiyyf avatar Feb 29 '24 16:02 zlaiyyf

try this, npm install --legacy-peer-deps

xuyunan avatar Apr 15 '24 06:04 xuyunan