当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
猜你喜欢

Deep Learning 100 Examples - Convolutional Neural Network (CNN) for mnist handwritten digit recognition

博云入选Gartner中国DevOps代表厂商

只问耕耘,不问收获,其实收获却在耕耘中

4年手工测试被应届生取代了,用血与泪的教训给xdm一个忠告,该学自动化了...

Axure谷歌浏览器扩展程序下载及安装方法(免翻墙)

从众多接口中脱颖而出的最稳定的接口——淘宝详情api

Com多进程通信实现

FPGA手撕代码——CRC校验码的多种Verilog实现方式 (2021乐鑫科技数字IC提前批代码编程)

MySQL模糊查询性能优化

MySQL百万数据优化总结 一
随机推荐
突破边界,华为存储的破壁之旅
划分训练集,验证集,测试集
如何在技术上来保证LED显示屏质量?
find查找多类型结尾文件
The exchange - string dp
智能手表前景如何?
Oracle 单实例19.11升级到19.12
SQL(面试实战07)
Oracle 19c配置ob server
Oracle 19c 连接PDB
Com多进程通信实现
MapStruct
LayaBox---TypeScript---命名空间和模块
保姆级教程:写出自己的移动应用和小程序(篇二)
[Science of Terminology] For those difficult words about the integrated workbench, read this article to understand in seconds!
配置mysql失败了,这是怎么回事呢?
翁恺C语言程序设计网课笔记合集
ansible module --copy module
Oracle降低高水位
博云入选Gartner中国DevOps代表厂商