我正在尝试使用wdio-v7设置一个新项目,首先我运行npm init -y,然后运行npm install @wdio/cli --save-dev,在运行npx wdio config -y之后,我收到以下内容:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: example-test@1.0.0
npm ERR! Found: @wdio/cli@7.0.5
npm ERR! node_modules/@wdio/cli
npm ERR! dev @wdio/cli@"^7.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @wdio/cli@"^6.0.0" from wdio-chromedriver-service@6.0.4
npm ERR! node_modules/wdio-chromedriver-service
npm ERR! dev wdio-chromedriver-service@"*" 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!
Initialize WebdriverIO and setup configuration in your current project.
Documentation: https://webdriver.io
@wdio/cli (v7.0.5)我尝试使用--force, or --legacy-peer-deps,但没有成功。
发布于 2021-02-19 09:51:42
这很奇怪,看起来npx wdio config -y正在尝试安装旧版本的chrome驱动程序服务。
尝试手动安装chromedriver服务或在package.json中更新版本
"wdio-chromedriver-service": "^7.0.0"确保您具有webdriverio的最低要求
https://webdriver.io/docs/gettingstarted#system-requirements
至少安装v12.16.1或更高版本,因为这是最旧的活动LTS版本。只有正式支持或将成为LTS发行版的版本才受
支持。
https://stackoverflow.com/questions/66251720
复制相似问题