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

npm install报 ERESOLVE unable to resolve dependency tree

三四年前的一个项目,打开,npm install 一下,结果报 ERESOLVE unable to resolve dependency tree
以前install都一切顺利,现在就不行,那很大的可能是npm的版本不同。

PS D:\workSpace\code\*-admin-ui-master> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: *-admin@0.1.0
npm ERR! Found: html-webpack-plugin@4.0.0-alpha
npm ERR! node_modules/html-webpack-plugin
npm ERR!   dev html-webpack-plugin@"4.0.0-alpha" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer html-webpack-plugin@"^3.0.0" from script-ext-html-webpack-plugin@2.0.1
npm ERR! node_modules/script-ext-html-webpack-plugin
npm ERR!   dev script-ext-html-webpack-plugin@"2.0.1" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\11703\AppData\Local\npm-cache\_logs\2023-11-02T07_24_59_256Z-eresolve-report.txtnpm ERR! A complete log of this run can be found in: C:\Users\11703\AppData\Local\npm-cache\_logs\2023-11-02T07_24_59_256Z-debug-0.log

查看logs:

'Log files:
C:\Users\11703\AppData\Local\npm-cache\_logs\2023-11-02T07_24_59_256Z-debug-0.log# npm resolution error reportWhile resolving: *-admin@0.1.0
Found: html-webpack-plugin@4.0.0-alpha
node_modules/html-webpack-plugindev html-webpack-plugin@"4.0.0-alpha" from the root projectCould not resolve dependency:
peer html-webpack-plugin@"^3.0.0" from script-ext-html-webpack-plugin@2.0.1
node_modules/script-ext-html-webpack-plugindev script-ext-html-webpack-plugin@"2.0.1" from the root projectFix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

给出的建议是:npm install --force 或者 --legacy-peer-deps

或者使用npx -p npm@6 npm install --legacy-peer-deps指定npm的版本。

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

相关文章:

  • CentOS 7上创建Python 3虚拟环境
  • B端设计必看的9个开源组件库,值得收藏!
  • 王坚院士:云计算与 GPT 的关系,就是电和电动机的关系
  • Git代码合并流程规范
  • 编译cef114.2 with h264
  • A股风格因子看板 (2023.11第01期)
  • Session+Cookie实现登录认证
  • mac matplotlib显示中文
  • python自动化测试模板
  • MySQL 外连接和内连接的查询优化怎么做?
  • Web自动化测试 —— cookie复用
  • Java自学第1课:安装JDK+Eclipse
  • zabbix6.4监控centos
  • 炫云客户端信用额度如何修改?
  • windows jar包文件默认打开方式设置
  • 高并发和存储之间的关系是什么?
  • Antv/G2 图表坐标轴文字过长时添加省略号
  • pycharm更改远程服务器地址
  • 海康监控摄像机和录像机接入LiveMedia GB28181平台实现远程调取监控视频
  • 一文全览各种 ES 查询在 Java 中的实现
  • Centralized Feature Pyramid for Object Detection解读
  • unity中meta文件GUID异常问题
  • 【k8s】pod集群调度
  • MathType数学公式编辑器2024官方最新版
  • Android照搬,可删
  • 2022最新版-李宏毅机器学习深度学习课程-P26 自注意力机制
  • 【Docker】Linux路由连接两个不同网段namespace,连接namespace与主机
  • C语言 DAY10 内存分配
  • SpringCloud Gateway 网关的请求体body的读取和修改
  • 气膜场馆的降噪方法