当前位置:网站首页>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
边栏推荐
- Simulation volume leetcode [general] 150. evaluation of inverse Polish expression
- vim文本编辑器的一些使用小技巧
- Hj37 statistics of the total number of rabbits per month Fibonacci series
- Student achievement ranking system based on C language design
- 20-40K| 梅卡曼德3D视觉算法/软件/产品经理招聘
- gin 路由,参数,输出
- 模拟卷Leetcode【普通】061. 旋转链表
- 要不要满足客户所有的需求
- 【Redis】Redis开发规范与注意事项
- Cvpr2022oral special series (I): low light enhancement
猜你喜欢

WPF简单登录页面的完成案例

Cvpr2022oral special series (I): low light enhancement

接口测试实战项目03:执行测试用例

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

Improved Pillar with Fine-grained Feature for 3D Object Detection论文笔记

建木持续集成平台v2.5.2发布

spark学习笔记(七)——sparkcore核心编程-RDD序列化/依赖关系/持久化/分区器/累加器/广播变量

Flink real-time warehouse DWD layer (transaction domain - additional purchase dimension degradation processing) template code

Unity exploration plot access design analysis & process + code specific implementation

线程同步—— 生产者与消费者、龟兔赛跑、双线程打印
随机推荐
Decompilation of wechat applet
Unity探索地块通路设计分析 & 流程+代码具体实现
Unity exploration plot access design analysis & process + code specific implementation
buck电路boot和ph引脚实测
模拟卷Leetcode【普通】061. 旋转链表
Pytorch多GPU条件下DDP集群分布训练实现(简述-从无到有)
【C语言刷LeetCode】2332. 坐上公交的最晚时间(M)
建木持续集成平台v2.5.2发布
Improved Pillar with Fine-grained Feature for 3D Object Detection论文笔记
pytest合集(7)— 参数化
mysql可以定时导出表格吗?
基于C语言设计的学籍管理系统
Cesium反射
[cf1054h] epic Revolution -- number theory, convolution, arbitrary modulus NTT
CVPR2022Oral专题系列(一):低光增强
win11VMware打开虚拟机就蓝屏重启以及启动不了的解决方案
怎么会不喜欢呢,CICD中轻松发送邮件
最新百亿量化私募名单
Summary of 2022 SQL classic interview questions (with analysis)
How to write controller layer code gracefully?