Appium 求助!! npm 安装 appium 时报错:RequestError: Error: read ECONNRESET

crystal · 2016年07月22日 · 最后由 老马 回复于 2019年02月14日 · 3791 次阅读


npm 安装 appium 时报错,求助大神们帮忙看下~感谢!

info AndroidDriver Java version is: 1.8.0_51

/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/node_modules/request-promise/lib/errors.js:11
        Error.captureStackTrace(this);
              ^
RequestError: Error: read ECONNRESET
    at new RequestError (/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/node_modules/request-promise/lib/errors.js:11:15)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/node_modules/request-promise/lib/rp.js:56:32)
    at self.callback (/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/node_modules/request-promise/node_modules/request/request.js:200:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/node_modules/appium-selendroid-installer/node_modules/request-promise/node_modules/request/request.js:831:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:308:9)
    at emitOne (events.js:101:20)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1272:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
/usr/local/lib
└── (empty)

npm ERR! Darwin 14.1.1
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--registry" "http://registry.cnpmjs.org" "install" "-g" "appium"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! appium-selendroid-driver@1.3.4 install: `node ./bin/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the appium-selendroid-driver@1.3.4 install script 'node ./bin/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appium-selendroid-driver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs appium-selendroid-driver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls appium-selendroid-driver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mu/npm-debug.log
npm ERR! code 1

共收到 13 条回复 时间 点赞

Selendroid 下载不下来

试试淘宝的npm 镜像

这个需要 *** 才能完成

谢谢大家~我重新试了一次就好了

#4 楼 @crystal 我也出现这个问题 你后面是怎么解决的

同出现这个问题,不过是在 chromedriver 安装的时候出现的,原因是上一次安装了这个然后又因为别的原因整个安装过程被中断了,最后是删除整个 node 的安装目录,重新放了个全新的 node 才解决的

#5 楼 @vincent_chu 将已安装的 appium 卸载干净后,重新安装就好了,可能是网络的问题

#7 楼 @crystal 谢谢 晚上回去我再试试

#6 楼 @iriszhang 我也出现这个问题 是删除/usr/local/lib/node_modules/这个目录吗

#7 楼 @crystal 还是不行。。

#9 楼 @vincent_chu 我的 node 是通过环境变量指定的,所以是将整个环境变量指定的目录都删除了

楼主,怎么好的呢。

npm i appium -g --CHROMEDRIVER_CDNURL=http://npm.taobao.org/mirrors/chromedriver/

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册