我在Vue项目中使用如下命令安装element-ui组件时安装不成功
npm i element-ui -S系统提示如下错误:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: vuedemo1@0.0.0 npm ERR! Found: vue@3.4.25 npm ERR! node_modules/vue npm ERR! vue@"^3.4.21" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vue@"^2.5.17" from element-ui@2.15.14 npm ERR! node_modules/element-ui npm ERR! element-ui@"*" 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! npm ERR! For a full report see: npm ERR! C:\Users\22748\AppData\Local\npm-cache\_logs\2024-04-28T08_29_37_664Z-eresolve-report.txt请问这是什么原因?
类似如下: