首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行"npx wdio config“时出现错误

运行"npx wdio config“时出现错误
EN

Stack Overflow用户
提问于 2021-05-06 08:33:07
回答 1查看 387关注 0票数 1

当我尝试通过运行"npx wdio config“将"Hello World”测试套件设置到我的项目中时,我得到了以下错误。我按照https://webdriver.io/docs/gettingstarted上的说明操作,但还是不能正常工作。

有人能帮我解决这个问题吗:

代码语言:javascript
复制
WDIO Configuration Helper


? Where is your automation backend located? (Use arrow keys)
❯ On my local machine 
  In the cloud using Experitest 
  In the cloud using Sauce Labs 
  In the cloud using Browserstack or Testingbot or LambdaTest or a different service 
  I have my own Selenium cloud (node:2831) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'find' of undefined
    at Object.run (/Users/gustavosuarez/web/mo-appium-wdio-jasmine/node_modules/@wdio/cli/build/index.js:67:19)
    at Object.<anonymous> (/Users/gustavosuarez/web/mo-appium-wdio-jasmine/node_modules/@wdio/cli/bin/wdio.js:11:21)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
EN

回答 1

Stack Overflow用户

发布于 2021-05-06 15:31:33

最新版本的@wdio/cli依赖似乎有问题。我用一个旧版本解决了这个问题,现在它可以工作了("@wdio/cli": "7.3.1")。只需将依赖项添加到package.json并再次运行yarnnpm install,然后运行npx wdio config,它就应该可以工作了。

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

https://stackoverflow.com/questions/67410409

复制
相关文章

相似问题

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