selenium-webdriver - 安装 chai 后,我将 chai-webdriverio 作为开发依赖项安装,但出现此错误
问题描述
npm i chai-webdriverio --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: webdriverio@1.0.0
npm ERR! Found: chai@4.3.4
npm ERR! node_modules/chai
npm ERR! dev chai@"^4.3.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer chai@"~4.0.1" from chai-webdriverio@1.0.0
npm ERR! node_modules/chai-webdriverio
npm ERR! dev chai-webdriverio@"*" 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 install chai-webdriverio --force
注意:使用 --force 会禁用推荐的保护。
推荐阅读
- r - 从 R 中的 stringdist 算法中删除 for 循环
- ios - 没有自我的自动释放池访问方法中的 Swift 闭包
- regex - 单击赛普拉斯中的完全匹配文本
- reactjs - 多个输入上的单个模糊事件
- python - 将字典转换为 Python 数据框
- xamarin - 如何为 RelativeLayout ConstraintExpression 编写 OnPlatform 代码
- java - 确保模拟调用时条件返回 false
- css - 如何简化引导菜单?
- javascript - 使用 Puppeteer 重新加载 Jest 后检查页面内容
- c# - asp.net css 在我的本地机器和远程机器上是不同的