当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
猜你喜欢
随机推荐
ssm网页访问数据库数据报错
QT笔记——Q_PROPERTY了解
Hub and Spoke配置案例
ansible模块--copy模块
多大数量级会出现哈希碰撞
Alibaba CTO Cheng Li: Alibaba Open Source History, Concept and Practice
5G基础学习1、5G网络架构、网络接口及协议栈
数字化转型中的低代码
多线程之生产者与消费者
OLED的HAL库代码介绍及使用(stm32f1/I2C/HAL库版/100%一次点亮)
从零开始Blazor Server(5)--权限验证
sqli-labs(less-11)
MapStruct
流动性质押挖矿系统开发如何制作?单双币系统开发成熟技术
Several reasons why applet plugins benefit developers
【2022 小目标检测综述】Towards Large-Scale Small Object Detection: Survey and Benchmarks
从测试入门到测试架构师,这10年,他是这样让自己成才的
After 21 years of graduation, I switched to software testing. From 0 income to a monthly salary of over 10,000, I am really lucky...
LayaBox---TypeScript---高级类型
The 38-year-old daughter is not in love and has no stable job, the old mother is crying