在终端中运行以下命令后,我无法在 mac 上安装 Xcuitest:“appium driver install xcuitest”

问题描述 投票:0回答:1
✖ Installing 'xcuitest' using NPM install spec 'appium-xcuitest-driver'
Error: ✖ Encountered an error when installing package: npm command 'install --save-dev --omit=peer --save-exact --global-style --no-package-lock appium-xcuitest-driver --json' failed with code 1.

STDOUT:
{
  "error": {
    "code": "EACCES",
    "summary": "\nYour cache folder contains root-owned files, due to a bug in\nprevious versions of npm which has since been addressed.\n\nTo permanently fix this problem, please run:\n  sudo chown -R 501:20 \"/Users/USERNAME/.npm\"",
    "detail": ""
  }
}

STDERR:
npm WARN config global-style This option has been deprecated in favor of `--install-strategy=shallow`
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /Users/USERNAME/.npm/_cacache/index-v5/26/ce/363bc520dd5a50689c636f2f5a6c1804d7844b9b622bec5f6f30c7623ded
npm ERR! errno EACCES
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 501:20 "/Users/USERNAME/.npm"

npm ERR! A complete log of this run can be found in: /Users/USERNAME/.npm/_logs/2023-06-15T18_51_39_343Z-debug-0.log

Right now I have no driver installed:
✔ Listing available drivers
- uiautomator2 [not installed]
- xcuitest [not installed]
- mac2 [not installed]
- espresso [not installed]
- safari [not installed]
- gecko [not installed]
- chromium [not installed]

我正在尝试安装

xcuitest
uiautomator2
驱动程序。

当我为

appium driver install xcuitest
运行命令
uiautomator2
时,我得到了相同的输出。

我在github上查看了Issue,但在这里找不到任何解决方案。

提前致谢。

automation appium xcuitest
1个回答
0
投票

安装前清除appium文件夹:

 rm -rf ~/.appium

有关类似问题的更多信息: https://github.com/appium/appium/issues/18006

© www.soinside.com 2019 - 2024. All rights reserved.