✖ 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,但在这里找不到任何解决方案。
提前致谢。