(资料图片)
报错内容
npm i element-ui -Snpm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR! npm ERR! While resolving: undefined@undefinednpm ERR! Found: vue@3.2.47npm ERR! node_modules/vuenpm ERR! peer vue@"3.2.47" from @vue/server-renderer@3.2.47npm ERR! node_modules/@vue/server-renderernpm ERR! @vue/server-renderer@"3.2.47" from vue@3.2.47npm ERR! peer vue@"^3.2.0" from vue-router@4.1.6npm ERR! node_modules/vue-routernpm ERR! vue-router@"^4.1.6" from the root projectnpm ERR! npm ERR! Could not resolve dependency:npm ERR! element-ui@"*" from the root projectnpm ERR! npm ERR! Conflicting peer dependency: vue@2.7.14npm ERR! node_modules/vuenpm ERR! peer vue@"^2.5.17" from element-ui@2.15.13npm ERR! node_modules/element-uinpm ERR! element-ui@"*" from the root projectnpm ERR! npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force, or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.npm ERR! npm ERR! See /Users/naitang/.npm/eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:npm ERR! /Users/naitang/.npm/_logs/2023-02-25T06_42_28_114Z-debug-0.log
vue安装element报错
或者安装其他报错
应该是版本问题
在安装命令后面加上
-legacy-peer-deps
例如
npm i element-ui -S -legacy-peer-deps
Copyright © 2015-2022 欧洲公司网版权所有 备案号:沪ICP备2022005074号-23 联系邮箱: 58 55 97 3@qq.com