appium / appium-uiautomator2-driver

Appium driver for Android UIAutomator2
Apache License 2.0
609 stars 179 forks source link

failed to install uiautomator2@2.37.0 #706

Closed jiyzhang closed 11 months ago

jiyzhang commented 11 months ago

OS: macOS Sonoma 14.2.1

I tried to uninstall old version and reinstall but still encountered the same issue.

$ appium driver update uiautomator2 ✔ Checking if driver 'uiautomator2' is updatable ✔ Checking if driver 'uiautomator2' needs an update ✖ Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver@2.37.0' ✖ Updating driver 'uiautomator2' from 2.34.2 to 2.37.0 ℹ Update report: ✖ - 'uiautomator2' failed to update: Error: ✖ Encountered an error when installing package: npm command 'install --save-dev --no-progress --no-audit --prefer-offline --omit=peer --save-exact --global-style --no-package-lock appium-uiautomator2-driver@2.37.0 --json' failed with code 1.

STDOUT: { "error": { "code": "ETARGET", "summary": "No matching version found for appium-uiautomator2-driver@2.37.0.", "detail": "In most cases you or one of your dependencies are requesting\na package version that doesn't exist." } }

STDERR: npm WARN config global-style This option has been deprecated in favor of --install-strategy=shallow npm ERR! code ETARGET npm ERR! notarget No matching version found for appium-uiautomator2-driver@2.37.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

KazuCocoa commented 11 months ago

It could be related to https://github.com/appium/appium/pull/19571

For now, please try out the same installation after npm cache clean --force

jiyzhang commented 11 months ago

It could be related to appium/appium#19571

For now, please try out the same installation after npm cache clean --force

Thanks very much for help, I can install/update to uiautomator2@2.37.0 now.

$ appium driver update uiautomator2 ✔ Checking if driver 'uiautomator2' is updatable ✔ Checking if driver 'uiautomator2' needs an update ✔ Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver@2.37.0' ✔ Updating driver 'uiautomator2' from 2.34.2 to 2.37.0 ℹ Update report: ✔ - driver uiautomator2 updated: 2.34.2 => 2.37.0