npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!-解决

PS F:\work\adapt-portal-web-mobile> npm install

npm ERR! code ERESOLVE

npm ERR! ERESOLVE could not resolve

npm ERR!

npm ERR! node_modules/compression-webpack-plugin

npm ERR! dev compression-webpack-plugin@"^10.0.0" from the root project

npm ERR!

npm ERR! Conflicting peer dependency: webpack@5.88.2

npm ERR! node_modules/webpack

npm ERR! peer webpack@"^5.1.0" from compression-webpack-plugin@10.0.0

npm ERR! node_modules/compression-webpack-plugin

npm ERR! dev compression-webpack-plugin@"^10.0.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\yjtzf\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\yjtzf\AppData\Local\npm-cache\_logs\2023-10-12T01_21_07_673Z-debug-0.log

解决方法

bash 复制代码
npm install --legacy-peer-deps

'npm install --legacy-peer-deps'命令允许你安装一个包,即使该包的peer依赖关系没有满足。在npm 7及以上版本中,npm默认行为是对peer依赖进行验证。如果peer依赖没有满足,npm会拒绝安装。而使用'--legacy-peer-deps'标志,可以改变这种行为,即使peer依赖没有满足也可以完成安装。但是,这可能会导致某些功能不工作或者出现其他问题,因此只有在你确定知道你在做什么的情况下才使用这个命令。

相关推荐
hkNaruto15 分钟前
【AI】基于大模型的AI游戏地图生成、控制方案:AI Native Game Harness 迁移操作手册
前端·人工智能·游戏
IT_陈寒25 分钟前
Java序列化踩坑记:对象循环引用让我加班两小时
前端·人工智能·后端
Acro40 分钟前
快给macOS 上的Grok Bot换一套皮肤
前端
flash俊杰42 分钟前
双引擎 OCR 编排:逐页判定、视觉优先、partial 语义与三层超时
前端
计算机魔术师42 分钟前
Reddit 每周被 Google 偷走 100 万次点击,CEO 摊牌了
前端
前端繁华如梦44 分钟前
用 React Three Fiber 做一栋能编辑的教学楼数字孪生
前端
前端繁华如梦1 小时前
用 React Three Fiber 做一套智慧医院数字孪生:编辑器、大屏和 BIM 浏览器
前端
俊昭喜喜里2 小时前
理解全局跨域CORS配置
前端
锋行天下5 小时前
DeepSeek写Langgraph就是个大傻逼,一本正经胡说八道
前端·人工智能·后端
jktantan5 小时前
每个节点 41 字节:把一棵百万节点树拆进 14 个 typed array
前端·javascript·vue.js·算法·typescript