首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用wdio-v7设置新项目时出现"ERESOLVE unable to resolve dependency tree“

使用wdio-v7设置新项目时出现"ERESOLVE unable to resolve dependency tree“
EN

Stack Overflow用户
提问于 2021-02-18 08:04:24
回答 1查看 309关注 0票数 0

我正在尝试使用wdio-v7设置一个新项目,首先我运行npm init -y,然后运行npm install @wdio/cli --save-dev,在运行npx wdio config -y之后,我收到以下内容:

代码语言:javascript
复制
    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,但没有成功。

EN

回答 1

Stack Overflow用户

发布于 2021-02-19 09:51:42

这很奇怪,看起来npx wdio config -y正在尝试安装旧版本的chrome驱动程序服务。

尝试手动安装chromedriver服务或在package.json中更新版本

代码语言:javascript
复制
"wdio-chromedriver-service": "^7.0.0"

确保您具有webdriverio的最低要求

https://webdriver.io/docs/gettingstarted#system-requirements

至少安装v12.16.1或更高版本,因为这是最旧的活动LTS版本。只有正式支持或将成为LTS发行版的版本才受

支持。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66251720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档