Heroku 错误错误:在新测试运行时找不到插件“本地”运行程序,也找不到 wdio 作用域包“@wdio/local-runner”

问题描述 投票:0回答:1

我正在将 WebdriverIo 与 NodeJs 框架一起使用。我的整个代码在本地系统中运行良好。脚本运行良好。但是当我在 Heroku 中运行时,我遇到了以下错误

~ $ npx wdio run wdio.conf.js --spec ./features/sanity-test/test.feature
wdio run <configPath>

Run your WDIO configuration file to initialize your tests. (default)

Options:
      --version             Show version number                        [boolean]

Documentation: https://webdriver.io
@wdio/cli (v7.25.4)

Error: Couldn't find plugin "local" runner, neither as wdio scoped package "@wdio/local-runner" nor as community package "wdio-local-runner". Please make sure you have it installed!
    at initialisePlugin (/app/node_modules/@wdio/cli/node_modules/@wdio/utils/build/initialisePlugin.js:41:11)
    at new Launcher (/app/node_modules/@wdio/cli/build/launcher.js:54:53)
    at launch (/app/node_modules/@wdio/cli/build/commands/run.js:125:22)
    at Object.handler (/app/node_modules/@wdio/cli/build/commands/run.js:165:16)
    at /app/node_modules/yargs/build/index.cjs:1:8993
    at j (/app/node_modules/yargs/build/index.cjs:1:4956)
    at _.handleValidationAndGetResult (/app/node_modules/yargs/build/index.cjs:1:8962)
    at _.applyMiddlewareAndGetResult (/app/node_modules/yargs/build/index.cjs:1:9604)
    at _.runCommand (/app/node_modules/yargs/build/index.cjs:1:7231)
    at [runYargsParserAndExecuteCommands] (/app/node_modules/yargs/build/index.cjs:1:58539)
npm notice
npm notice New major version of npm available! 9.8.1 -> 10.2.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.3
npm notice Run npm install -g [email protected] to update!
npm notice

我附上我的package.json以供参考。

    {
  "name": "testingsanity",
  "version": "1.0.0",
  "description": "test",
  "main": "index.js",
  "scripts": {
    "test": "npx wdio run wdio.conf.js --spec ./features/sanity-test/test.feature",
    "wdio": "wdio run wdio.conf.js --spec ./features/sanity-test/test.feature",
    "start":"npx wdio run wdio.conf.js --spec ./features/sanity-test/test.feature"
  },
  "author": "testing",
  "license": "ISC",
  "devDependencies": {
    "@wdio/local-runner": "^7.25.4",
    "@wdio/spec-reporter": "^8.11.2",
    "chromedriver": "~117.0.3",
    "wdio-chromedriver-service": "^8.1.1"
  },
  "dependencies": {
    "@wdio/cli": "^7.25.4",
    "@wdio/cucumber-framework": "^7.25.4",
    "cucumber-html-reporter": "^5.5.0",
    "fs-extra": "^11.1.1",
    "puppeteer": "^21.3.8",
    "wdio-cucumberjs-json-reporter": "^4.4.3"
  }
}

请求帮忙

附上错误快照以供参考 enter image description here enter image description here

heroku webdriver-io heroku-cli
1个回答
0
投票

您能分享一下您是如何解决这个问题的吗?

© www.soinside.com 2019 - 2024. All rights reserved.