当前位置:网站首页>npm install报错npm ERR Could not resolve dependency npm ERR peer
npm install报错npm ERR Could not resolve dependency npm ERR peer
2022-08-02 11:08:00 【m0_67393295】
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
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
猜你喜欢
STM32+MPU6050设计便携式Mini桌面时钟(自动调整时间显示方向)
细学常用类,集合类,IO流
ASP.NET Core 6框架揭秘实例演示[31]:路由"高阶"用法
博云入选Gartner中国DevOps代表厂商
sva assertion data
SQL 经典50题(题目+解答)(1)
Outsourced Student Management System Architecture Documentation
有奖征集|TaoCloud&宝德联合举办全闪POC!
STM32+MPU6050 Design Portable Mini Desktop Clock (Automatically Adjust Time Display Direction)
yolo格式(txt)数据集转VOC(xml)
随机推荐
AlphaFold又放大招,剑指整个生物界!
情景剧《重走长征路》上演
Nanny Level Tutorial: Write Your Own Mobile Apps and Mini Programs (Part 2)
SVN如何删除文件名包含空格的文件
How to choose a truly "easy-to-use, high-performance" remote control software
循环语句综合练习
多线程之生产者与消费者
深度学习100例 —— 卷积神经网络(CNN)实现mnist手写数字识别
find查找多类型结尾文件
QT笔记——Q_PROPERTY了解
为什么要使用BGP?
10份重磅报告 — 展望中国数字经济未来
MySql模糊查询大全
流动性质押挖矿系统开发如何制作?单双币系统开发成熟技术
智能手表前景如何?
STM32+MPU6050设计便携式Mini桌面时钟(自动调整时间显示方向)
yolo格式(txt)数据集转VOC(xml)
【2022 小目标检测综述】Towards Large-Scale Small Object Detection: Survey and Benchmarks
阿里云数据存储生态计划发布,助力伙伴数据创新
ansible模块--copy模块