I pull my project from other computer, it works fine there, but when i npm install on this machine it got this error. can i have some clue about how to fix this and what I need to do to avoid this kind of problem in the future.
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR! vue@"^3.2.45" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.17" from [email protected]
npm ERR! node_modules/element-ui
npm ERR! element-ui@"^2.4.5" 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've tried installing vue, update npm to v18, all requirement are supposed to be fulfilled
CodePudding user response:
You are installing ElementUI version 2.15.12 - which supports only Vue version 2 but your Vue is version 3.
Either install ElementPlus or downgrage Vue 3 to Vue 2.