【问题标题】:WebdriverIO throw error after NPM version updateNPM版本更新后WebdriverIO抛出错误
【发布时间】:2021-11-30 11:54:22
【问题描述】:

我只是更新了 webdriverIO 项目中的所有包和 NPM 版本,但现在它无法正常工作并引发以下错误

错误@wdio/local-runner:启动测试会话失败:错误:无法初始化“@wdio/allure-reporter”。 [0-0] 错误:找不到模块 'csv-stringify/sync'

我尝试了所有可能的组合,例如删除诱惑报告降级版本等,但没有成功。 这是我的packageJson

    "homepage": "https://github.com/",
      "dependencies": {
      "@wdio/cli": "^7.16.10",
    "allure-commandline": "^2.13.8",
    "csv": "^6.0.4",
    "csv-stringify": "^6.0.4",
    "prettier": "^2.5.0"
  },
  "devDependencies": {
    "@babel/preset-env": "^7.16.4",
    "@babel/register": "^7.16.0",
    "@wdio/allure-reporter": "^7.16.10",
    "@wdio/dot-reporter": "^7.16.6",
    "@wdio/junit-reporter": "^7.16.6",
    "@wdio/local-runner": "^7.16.10",
    "@wdio/mocha-framework": "^7.16.6",
    "@wdio/spec-reporter": "^7.16.9",
    "chai": "^4.3.4",
    "chromedriver": "^96.0.0",
    "wdio-chromedriver-service": "^7.2.2"
  }
}

npm -v 8.1.4

【问题讨论】:

  • 尝试删除节点模块和包锁文件,并从包.json中删除cave和csv-stringify选项

标签: npm webdriver-io


【解决方案1】:

我通过更新节点版本并从头开始构建项目来解决这个问题

【讨论】:

    猜你喜欢
    • 2015-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-08
    • 1970-01-01
    相关资源
    最近更新 更多