在用 appium2 安装驱动时总是出现这个错误
安装 appium driver install uiautomator2 时也有好多次,但不知道怎么了,又好了。
但装 chromium 驱动时又出来了,这倒底是什么原因啊?
谢谢

PS C:\Users\xx> appium driver install chromium
× Installing 'chromium' using NPM install spec 'appium-chromium-driver'
Error: × Encountered an error when installing package: npm command 'install --save-dev appium-chromium-driver --json' failed with code 1.

STDOUT:
{
  "error": {
    "code": 1,
    "summary": "command failed",
    "detail": "C:\\WINDOWS\\system32\\cmd.exe /d /s /c node install-npm.js\n[22:03:41] Error installing Chromedriver: read ECONNRESET\n[22:03:41] Error: read ECONNRESET\n    at Function.AxiosError.from (C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\axios\\lib\\core\\AxiosError.js:89:14)\n    at RedirectableRequest.handleRequestError (C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\axios\\lib\\adapters\\http.js:591:25)\n    at RedirectableRequest.emit (node:events:526:35)\n    at ClientRequest.eventHandlers.<computed> (C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\follow-redirects\\index.js:14:24)\n    at ClientRequest.emit (node:events:514:28)\n    at TLSSocket.socketErrorListener (node:_http_client:495:9)\n    at TLSSocket.emit (node:events:514:28)\n    at emitErrorNT (node:internal/streams/destroy:151:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n    at processTicksAndRejections (node:internal/process/task_queues:82:21)\n[22:03:41] Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable."
  }
}

STDERR:
npm WARN deprecated typedoc-plugin-resolve-crossmodule-references@0.3.3: Upgrade to typedoc >= 0.24 and remove typedoc-plugin-resolve-crossmodule-references from your dependencies
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\appium',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\ty\node_modules\appium-chromium-driver\node_modules\appium'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\appium'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\ty\node_modules\appium-chromium-driver\node_modules\appium'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\appium'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ty\\node_modules\\appium-chromium-driver',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\ty\node_modules\appium-chromium-driver\node_modules\appium'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ty\\node_modules\\appium-chromium-driver\\node_modules\\appium'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\ty\node_modules\appium-chromium-driver\node_modules\appium-chromedriver
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install-npm.js
npm ERR! [22:03:41] Error installing Chromedriver: read ECONNRESET
npm ERR! [22:03:41] Error: read ECONNRESET
npm ERR!     at Function.AxiosError.from (C:\Users\ty\node_modules\appium-chromium-driver\node_modules\axios\lib\core\AxiosError.js:89:14)
npm ERR!     at RedirectableRequest.handleRequestError (C:\Users\ty\node_modules\appium-chromium-driver\node_modules\axios\lib\adapters\http.js:591:25)
npm ERR!     at RedirectableRequest.emit (node:events:526:35)
npm ERR!     at ClientRequest.eventHandlers.<computed> (C:\Users\ty\node_modules\appium-chromium-driver\node_modules\follow-redirects\index.js:14:24)
npm ERR!     at ClientRequest.emit (node:events:514:28)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:495:9)
npm ERR!     at TLSSocket.emit (node:events:514:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! [22:03:41] Downloading Chromedriver can be skipped by setting the'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.

npm ERR! A complete log of this run can be found in: F:\nodejs\node_cache\_logs\2023-08-17T14_00_59_110Z-debug-0.log


↙↙↙阅读原文可查看相关链接,并与作者交流