appium: Installing 'appium-uiautomator2-driver' after 2.0.0-beta.46 update failed
The problem
I was on appium version:2.0.0-beta.45 with appium-uiautomator2-driver .
After I updated appium to .46 and re-installed appium-uiautomator2-driver. I receive the below Error:
Error: × Encountered an error when installing package: npm command 'install --save-dev appium-uiautomator2-driver --json' failed with code 1.
Environment
- Appium version (or git revision) that exhibits the issue: 2.0.0-beta.46
- Last Appium version that did not exhibit the issue (if applicable): 2.0.0-beta.45
- Desktop OS/version used to run Appium: WIN HOME 10
- Node.js version (unless using Appium.app|exe): 16.18.0
- Npm or Yarn package manager:
- Mobile platform/version under test: Android
- Real device or emulator/simulator: emulator
- Appium CLI or Appium.app|exe:
Details
× 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 1.
STDOUT:
STDERR:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: appium@1.22.3
npm ERR! node_modules/appium
npm ERR! appium@"^1.22.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer appium@"^2.0.0-beta.40" from appium-uiautomator2-driver@2.8.0
npm ERR! node_modules/appium-uiautomator2-driver
npm ERR! dev appium-uiautomator2-driver@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Dor-B\AppData\Local\npm-cache\eresolve-report.txt for a full report.
{
"error": {
"code": "ERESOLVE",
"summary": "unable to resolve dependency tree",
"detail": "\nWhile resolving: undefined@undefined\nFound: appium@1.22.3\nnode_modules/appium\n appium@\"^1.22.3\" from the root project\n\nCould not resolve dependency:\npeer appium@\"^2.0.0-beta.40\" from appium-uiautomator2-driver@2.8.0\nnode_modules/appium-uiautomator2-driver\n dev appium-uiautomator2-driver@\"*\" from the root project\n\nFix the upstream dependency conflict, or retry\nthis command with --force, or --legacy-peer-deps\nto accept an incorrect (and potentially broken) dependency resolution.\n\nSee C:\\Users\\Dor-B\\AppData\\Local\\npm-cache\\eresolve-report.txt for a full report."
}
}
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the examples
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in examples, please submit a PR with one of the sample apps provided.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (6 by maintainers)
Find the solution, I perform the following steps :
npm -g install npm@6
appium driver install xcuitest
And then, it works !
I occur this issue, I am unable to uninstall appium
What I do :
npm uninstall -g appium
npm uninstall -g appium@1.22.3
to ensure that I well uninstall this specific versionappium -v
I have this result :
bash: /opt/homebrew/bin/appium: No such file or directory
I reboot my computer
I perform :
npm install -g appium@next
npm install appium driver install xcuitest
And I still have this following error :
Please, help !
You probably have some leftovers from the old Appium version. Make sure these are removed first