Appium 请问 appium --help 无法打开是怎么回事?

tankb52 · 2017年07月19日 · 最后由 tankb52 回复于 2017年07月20日 · 1964 次阅读

出错的提示如下

λ appium --help

C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:380
        parts.forEach(function (part) {
              ^
TypeError: parts.forEach is not a function
    at _getLines (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:380:15)
    at HelpFormatter._formatUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:418:17)
    at C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:67:17
    at Array.map (native)
    at Section.formatHelp (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:61:26)
    at HelpFormatter.formatHelp (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\help\formatter.js:300:32)
    at ArgumentParser.formatUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1026:20)
    at ArgumentParser.printUsage (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1082:27)
    at ArgumentParser.error (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:1156:8)
    at ArgumentParser.parseKnownArgs (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:297:10)
    at ArgumentParser.parseArgs (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_argparse@1.0.9@argparse\lib\argument_parser.js:234:21)
    at ArgumentParser.parser.parseArgs (../../lib/parser.js:752:29)
    at main$ (../../lib/main.js:146:4)
    at tryCatch (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:100:21)
    at invoke (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:136:37)
    at enqueueResult (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:185:17)
    at Promise.F (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_core-js@1.2.7@core-js\library\modules\$.export.js:30:36)
    at AsyncIterator.enqueue (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:100:21)
    at Object.runtime.async (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium\node_modules\_babel-runtime@5.8.24@babel-runtime\regenerator\runtime.js:209:12)
    at main (../../lib/main.js:152:13)
    at asyncify (lib/asyncbox.js:65:15)
    at Object.<anonymous> (../../lib/main.js:183:2)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3
共收到 8 条回复 时间 点赞

appium doctor 看看呢

深蓝 回复
appium-doctor
Error: Cannot find module 'buffer-shims'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium-doctor\node_modules\_readable-stream@2.2.9@readable-stream\lib\_stream_readable.js:33:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\rd0502\AppData\Roaming\npm\node_modules\appium-doctor\node_modules\_readable-stream@2.2.9@readable-stream\readable.js:12:30)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)

是这个错误。当然 buffer-shims 其实早已经安装成功了。

好吧,我把 nodejs 以及 npm 安装的 appium 一并卸载了。用的 gui 版的 appium 1.4.16.1,但是启动后脚本执行不了.

appium 内信息如下,请问这是什么原因呢?

@Tank007 xcode8 以上 还支持 appium1.5.3 以下吗?

匿名 #5 · 2017年07月19日
浅浅 回复

不支持,不过 github 上面说 XCode >= 6.0, 7.1.1 recommended,一般 xcode8 就使用 xcuitest 了,要用 WDA 了

@Tank007 WDA 是一个什么工具呢

匿名 #7 · 2017年07月19日
浅浅 回复

WebDriverAgent

浅浅 回复

呃,楼上两位是不是发错地方了?

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