安装组件库vant时遇到的问题

安装报错:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hello-world@0.1.0
npm ERR! Found: vue@2.7.10
npm ERR! node_modules/vue
npm ERR! vue@"^2.6.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.0.0" from vant@3.6.2
npm ERR! node_modules/vant
npm ERR! vant@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

解决方法:

我的解决办法,退而求次安装vue2版本,然后成功了,可以想到,应该是npm的版本过低了,更新npm或许可以安装vue3的

 

posted @ 2022-09-14 22:04  Oo王小二oO  阅读(620)  评论(0)    收藏  举报