npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: vuedemo01@0.1.0
npm ERR! Found: vue@3.2.37
npm ERR! node_modules/vue
npm ERR!   vue@"^3.2.13" from the root project     
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.17" from element-ui@2.15.9
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! 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\2022-06-27T02_27_28_208Z-debug-0.log

当安装依赖的时候,发生了以上的报错行为的时候,就说明了一件事:

        你的npm版本过高了。

当然如果此时你简简单单的只是去降低npm的版本,很遗憾的可以说,不顶用,甚至会因为与node环境的版本差距过大,导致npm不支持node环境了。

        所以解决办法就是:

                卸载node环境重新安装版本稍微低一点的。

首先就是先将电脑上之前的node环境完完全全的卸载干净,此处我引用一下别人的文章:

 点击这个其他下载选项;

点击以前的版本;

 

此处寻找合适的node版本,我选择的是14.17.0版本,并成功的安装了依赖。