使用Appium安装uiautomator2驱动程序时出错

仙童
仙童
订阅者
643
文章
0
粉丝
测试交流评论240字数 269阅读0分53秒阅读模式
摘要我对appium很陌生,我尝试将uiautomator2驱动程序安装到最新的appium 2.0.0-beta版本。41通过命令appium driver install uiau...

我对appium很陌生,我尝试将uiautomator2驱动程序安装到最新的appium 2.0.0-beta版本。41通过命令 appium驱动程序安装uiautomator2

我总是得到这样的输出:文章源自玩技e族-https://www.playezu.com/193088.html

> STDERR:
npm ERR! code 1
npm ERR! path C:UsersmartiAppDataRoamingnpmnode_modulesappium
npm ERR! command failed
npm ERR! command C:Windowssystem32cmd.exe /d /s /c C:UsersmartiAppDataLocalTempprepare-6703812f.cmd
npm ERR! > appium@2.0.0-beta.41 build
npm ERR! > babel lib --root-mode=upward --out-dir=build/lib
npm ERR! SyntaxError: lib/appium.js: Unexpected token (47:11)
npm ERR!   45 |    * @type {Record<string,ExternalDriver>}
npm ERR!   46 |    */
npm ERR! > 47 |   sessions = {};
npm ERR!      |            ^
npm ERR!   48 |
npm ERR!   49 |   /**
npm ERR!   50 |    * Access to pending drivers list must be guarded with a Semaphore, because
{
  "error": {
    "code": 1,
    "summary": "command failed",
    "detail": "C:\Windows\system32\cmd.exe /d /s /c C:\Users\marti\AppData\Local\Temp\prepare-6703812f.cmdn> appium@2.0.0-beta.41 buildn> babel lib --root-mode=upward --out-dir=build/libnSyntaxError: lib/appium.js: Unexpected token (47:11)n  45 |    * @type {Record<string,ExternalDriver>}n  46 |    */n> 47 |   sessions = {};n     |
 ^n  48 | n  49 |   /**n  50 |    * Access to pending drivers list must be guarded with a Semaphore, because"
  }
}

所以这个错误可能与babel试图传输lib/appium有关。js文件?文章源自玩技e族-https://www.playezu.com/193088.html

我已经通过安装了babel pm安装babel cli babel core--保存开发文章源自玩技e族-https://www.playezu.com/193088.html

我还需要做什么?文章源自玩技e族-https://www.playezu.com/193088.html

软件测试功能文档文章源自玩技e族-https://www.playezu.com/193088.html 文章源自玩技e族-https://www.playezu.com/193088.html

 
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证