Appium cnpm install -g appium@1.10.0 报错

桔子 · 2020年03月02日 · 最后由 恒温 回复于 2020年03月21日 · 1928 次阅读

TypeError: androidHelpers.getJavaVersion is not a function
at doInstall (/usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.13.4@appium-selendroid-driver/bin/install.js:21:18)
at Object. (/usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.13.4@appium-selendroid-driver/bin/install.js:63:3)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint as runMain
at internal/main/run_main_module.js:17:47
[npminstall:runscript:error] appium-selendroid-driver@1.x scripts.install run "node ./bin/install.js" error: Error [RunScriptError]: Run "sh -c node ./bin/install.js" error, exit code 1
at ChildProcess. (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:96:21)
at ChildProcess.emit (events.js:321:20)
at maybeClose (internal/child_process.js:1026:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
name: 'RunScriptError',
stdio: [Object]
}
Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "sh -c node ./bin/install.js" error, exit code 1

单独执行
appium-selendroid-driver@1.13.4@appium-selendroid-driver/bin/install.js 报同样的错误

java 版本是 1.8.0_101

共收到 5 条回复 时间 点赞

appium-android-driver 里面 androidHelpers.getJavaVersion 方法早就被移除了。装最新的版本吧。

你好,这个问题解决了吗,我也遇到了这个问题

@ 恒温 请问我也遇到楼主的问题 此时应该用什么办法 才能成功安装 appium

安装最新的 别用这个版本了

selendroid driver 还在用么?

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