Appium MAC (10.13.6) 安装 Appium 时报错,大侠们有谁解决过这坑?

头大点怎么了 · July 23, 2018 · Last by 头大点怎么了 replied at July 25, 2018 · Last modified by admin simple · 2504 hits

wangjianqingdeMacBook-Air:~ wangjianqing$ java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
wangjianqingdeMacBook-Air:~ wangjianqing$ node -v
v8.9.3
wangjianqingdeMacBook-Air:~ wangjianqing$ npm -v
5.5.1
wangjianqingdeMacBook-Air:~ wangjianqing$ python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 26 2018, 19:50:54)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

wangjianqingdeMacBook-Air:~ wangjianqing$ npm install -g appium
/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/bin/appium -> /usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/build/lib/main.js

> appium-chromedriver@4.0.0 install /usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

info Chromedriver Install Installing Chromedriver version '2.38' for platform 'mac' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_mac64 to...
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.38/chromedriver_mac64.zip...
RequestError: Error: connect ETIMEDOUT 216.58.217.251:443
at new RequestError (/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/request/request.js:185:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/request/request.js:877:8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.0.0 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
共收到 10 条回复 时间 点赞

RequestError: Error: connect ETIMEDOUT 216.58.217.251:443连不上谷歌服务,需要FQ才能安装

npm拉包时候的网络问题,可以用taobao的npm registry。
参考链接https://npm.taobao.org/
或者直接用yarn替换npm。


有海外的服务器,可以FQ。。。为啥还有这种连接问题。。

命令行下,不一定能***吧

Kevin Gu 回复

链接问题没有了,安装过程中又出现了chomedriver的问题,是不是和我自己之前单独安装过chomedriver有关系
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@4.0.0 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

(node:869) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018624-869-rq1n7l.ntgf'
(node:869) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:869) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info Chromedriver Install Installing Chromedriver version '2.38' for platform 'mac' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_mac64 to...
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/2018624-869-kqrq5s.haln'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.0.0 install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wangjianqing/.npm/_logs/2018-07-24T02_47_41_232Z-debug.log

permission denied,和你单独装chomedriver没关系。
https://github.com/appium/appium/issues/10020 看看这个还能帮助你不

执行:npm install appium-chromedriver@4.0.0 --ignore-scripts
执行:npm install npm -g

头大点怎么了 关闭了讨论 25 Jul 10:45
头大点怎么了 重新开启了讨论 25 Jul 10:47
金主 回复

该方法也没有生效。。。我重新安装node,直接下载的dmg。目前已经解决,多谢各位的热心留言!祝大家工作顺利!😄

Kevin Gu 回复

暴力解决,重装了node。。。

是,我直接dmg了。。。

头大点怎么了 关闭了讨论 25 Jul 10:59
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up