0

我在 Lerna repo 工作并想npx webdriver-manager update --versions.chrome=98.0.4758.80为我的 e2e 测试做

我也试过npx webdriver-manager updatenpx ./packages/testing/node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update

我总是得到这个结果:

npx: installed 88 in 4.393s
webdriver-manager: using global installed version 12.1.8
[13:39:20] I/file_manager - creating folder /Users/Prename.Lastname/.npm/_npx/97900/lib/node_modules/webdriver-manager/selenium
[13:39:20] I/config_source - curl -o/Users/Prename.Lastname/.npm/_npx/97900/lib/node_modules/webdriver-manager/selenium/standalone-response.xml https://selenium-release.storage.googleapis.com/
[13:39:20] I/config_source - curl -o/Users/Prename.Lastname/.npm/_npx/97900/lib/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
[13:39:20] I/config_source - curl -o/Users/Prename.Lastname/.npm/_npx/97900/lib/node_modules/webdriver-manager/selenium/gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases
events.js:377
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on Request instance at:
    at Request.onRequestError (/Users/Prename.Lastname/.npm/_npx/97900/lib/node_modules/webdriver-manager/node_modules/request/request.js:877:8)
    at ClientRequest.emit (events.js:412:35)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:400:28)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  errno: -54,
  code: 'ECONNRESET',
  syscall: 'read'
}

我已经尝试过的:

  • npx webdriver-manager clean
  • 为所有用户全局安装 webdriver-manager(然后再次卸载)
  • 删除所有 node_modules 并再次运行npm i
  • 搜索过npx webdriver-manager update-help

有谁知道问题可能是什么?

4

1 回答 1

0

好的,我不知道为什么,但它现在起作用了..这是我所做的:

  1. npm uninstall webdriver-manager
  2. npm i
  3. npx webdriver-manager clean

接着npx ./packages/testing/node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update

于 2022-02-07T13:35:48.010 回答