当前位置:网站首页>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
边栏推荐
- Teacher wangshuyao's notes on operations research 03 KKT theorem
- 网上传说软件测试培训真的那么黑心吗?都是骗局?
- Student achievement ranking system based on C language design
- Connecting PHP 7.4 to Oracle configuration on Windows
- 自定义事件
- 模拟卷Leetcode【普通】150. 逆波兰表达式求值
- Teacher Wu Enda's machine learning course notes 04 multiple linear regression
- Implementation of DDP cluster distributed training under pytoch multi GPU conditions (brief introduction - from scratch)
- Pod基本介绍
- [C language brush leetcode] 2332. The latest time to get on the bus (m)
猜你喜欢
随机推荐
VMware16创建虚拟机:无法创建新虚拟机,不具备执行此操作的权限
Teacher wangshuyao's notes on operations research 06 linear programming and simplex method (geometric significance)
Simulation volume leetcode [normal] 081. Search rotation sort array II
SSH password free login - two virtual machines establish password free channel two-way trust
图像加噪声与矩阵求逆
Teacher wangshuyao's operations research course notes 07 linear programming and simplex method (standard form, base, base solution, base feasible solution, feasible base)
微信小程序的反编译
网上传说软件测试培训真的那么黑心吗?都是骗局?
Teacher wangshuyao's notes on operations research 04 fundamentals of linear algebra
Summary of 2022 SQL classic interview questions (with analysis)
Flink实时仓库-DWD层(下单-多张表实现join操作)模板代码
【C语言刷LeetCode】1054. 距离相等的条形码(M)
Flink real time warehouse DWD layer (traffic domain) template code
Flink real-time warehouse DWD layer (Kafka associated with MySQL lookup join) template code
1172. 餐盘栈 有序列表+栈
Simulation volume leetcode [ordinary] 172. Zero after factorial
模拟卷Leetcode【普通】093. 复原 IP 地址
Ali gave several SQL messages and asked how many tree search operations need to be performed?
Overview of database system
H3C_利用设置缺省静态路由优先级实现出口双线路的主备功能









