Unable to install uiautomator2 driver in cmd admin mode

Hello,

I’m trying to install uiautomator2 driver via cmd administrative mode, but getting below error. But I can able to install the same in cmd non-admin mode, but it is not working when i run the appium code saying uiautomator2 driver is not installed.

× Installing ‘uiautomator2’ using NPM install spec ‘appium-uiautomator2-driver’
Error: × Encountered an error when installing package: npm command ‘install --save-dev appium-uiautomator2-driver --json’ failed with code null.

STDOUT:

STDERR:

Configurations in my system
Node : v18.12.1 (Installed via installer )
NPM : 8.19.2 ( came along with node)
appium version: 2.0.0-beta.48 (installed via cmd admin)
Java version : jdk-19

kindly help here to resolve this issue.

I don’t understand what you mean by this. Here are some pointers on how to ask a good question: