当前位置: 首页 > news >正文

Vue安装插件时候中遇到冲突依赖解决方案

错误如下:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/eslint-config-standard@6.1.0    
npm ERR! Found: eslint-plugin-vue@8.7.1
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   dev eslint-plugin-vue@"^8.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR!   dev @vue/eslint-config-standard@"^6.1.0" from the root project      
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR!   node_modules/@vue/eslint-config-standard
npm ERR!     dev @vue/eslint-config-standard@"^6.1.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 C:\Users\曾\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\曾\AppData\Local\npm-cache\_logs\2023-09-27T12_09_33_066Z-debug-0.log

解决方法:

npm install postcss-px-to-viewport@1.1.1 -D --legacy-peer-deps

只需要在后面加 --legacy-peer-deps就能解决依赖冲突问题

原理:

--legacy-peer-deps 是一个在 npm 包管理器和 yarn 包管理器中使用的命令行选项。它允许你在一个项目中忽略 peer dependencies 的版本冲突或缺失,使项目可以正常安装和运行,而不会因为这些冲突或缺失导致错误

http://www.lryc.cn/news/177021.html

相关文章:

  • realloc函数应用IO泄露体验
  • (c语言)野指针
  • 【Git】轻松学会 Git(一):掌握 Git 的基本操作
  • rust trait对象
  • Linux学习第21天:Linux内核定时器驱动开发: 流淌的时间长河
  • Centos服务在服务器重启后自启
  • 慢性疼痛治疗服务公司Kindly MD申请700万美元纳斯达克IPO上市
  • 代码随想录 Day6 哈希 LeetcodeT454 四数之和II T383赎金信 T15 三数之和 T18 四数之和
  • 干货速来|教你如何撰写毕业论文
  • 【ROS 2】-2 话题通信
  • Unity之NetCode多人网络游戏联机对战教程(2)--简单实现联机
  • makdown文法
  • 新手程序员怎么接单?
  • 接口测试——接口协议抓包分析与mock_L2
  • Seata入门系列【1】安装seata 1.7.1+nacos 2.1.1
  • 2023年职业院校技能大赛中职组----大数据应用与服务赛项任务书试题
  • 产品经理的职业前景怎么样?一文为你全面解答!
  • 【深度学习】图像去噪(2)——常见网络学习
  • 八大排序详解
  • 自定义热加载:如何不停机实现核心代码更新
  • Spring Cloud Alibaba Nacos 2.2.3 (2) - 单机版启动 (winodows 和 linux )
  • VB从资源文件中播放wav音乐文件
  • web:[HCTF 2018]WarmUp
  • 程序开发常用在线工具汇总
  • crypto:丢失的MD5
  • 气传导和骨传导耳机哪个好?气传导耳机好用吗?气传导耳机推荐
  • Spring 的代理开发设计
  • 实现注册手机号用户
  • 【2023年11月第四版教材】第15章《风险管理》(第三部分)
  • datart导入hive连接包