当前位置:网站首页>npm install报错npm ERR Could not resolve dependency npm ERR peer
npm install报错npm ERR Could not resolve dependency npm ERR peer
2022-07-29 06:28:00 【m0_67401228】
vue安装时报错npm ERR! Could not resolve dependency: npm ERR! peer…
报错日志如下
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! [email protected]“^7.4.0” from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer [email protected]“^5.0.0 || ^6.0.0” from [email protected]
npm ERR! dev [email protected]“^6.2.0” 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 D: ode ode_cacheeresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! D: ode ode_cache_logs?2-04-28T06_55_18_256Z-debug-0.log
报错原因
在新版本的npm中,默认情况下,npm install遇到冲突的peerDependencies时将失败。
解决办法
使用--force或--legacy-peer-deps可解决这种情况。
--force 会无视冲突,并强制获取远端npm库资源,当有资源冲突时覆盖掉原先的版本。--legacy-peer-deps:安装时忽略所有peerDependencies,忽视依赖冲突,采用npm版本4到版本6的样式去安装依赖,已有的依赖不会覆盖。
建议用--legacy-peer-deps 比较保险一点
在终端重新安装即可解决
npm install --legacy-peer-deps
边栏推荐
猜你喜欢

vscode通过remotessh结合xdebug远程调试php解决方案

MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of

基于C语言设计的学生成绩排名系统

leetcode-592:分数加减运算

Windows 上 php 7.4 连接 oracle 配置

Teacher wangshuyao's notes on operations research course 10 linear programming and simplex method (discussion on detection number and degradation)

ECCV 2022丨轻量级模型架ParC-Net 力压苹果MobileViT代码和论文下载

Teacher Wu Enda's machine learning course notes 02 univariate linear regression

MutationObserver文档学习

VMware16安装虚拟机遇到的问题
随机推荐
HJ37 统计每个月兔子的总数 斐波那契数列
IDEA中实现Mapper接口到映射文件xml的跳转
pytest合集(7)— 参数化
Teacher Wu Enda machine learning course notes 01 introduction
【解决方案】ERROR: lib/bridge_generated.dart:837:9: Error: The parameter ‘ptr‘ of the method ‘FlutterRustB
gin 服务退出
Teacher Wu Enda's machine learning course notes 04 multiple linear regression
Simulation volume leetcode [normal] 061. rotating linked list
VMware16创建虚拟机:无法创建新虚拟机,不具备执行此操作的权限
Teacher Wu Enda's machine learning course notes 00 are written in the front
pytorch的技巧记录
Teacher Wang Shuyao's notes on operations research 09 linear programming and simplex method (Application of simplex table)
做开发4年13K,想转行自动化测试,薪资还能涨吗···
自定义事件
Revolution of game assets
竣达技术 | 适用于”日月元”品牌UPS微信云监控卡
模拟卷Leetcode【普通】093. 复原 IP 地址
Flink实时仓库-DWD层(kafka-关联mysql的lookup join)模板代码
【charles日常问题】开启charles,使用不了钉钉
Simulation volume leetcode [normal] 222. number of nodes of complete binary tree