appium: driver installation in appium 2 fails because of appium@2.0.0-beta.41 as peerDependencies
The problem
CI in ruby_linb_core started failing to install drivers since yesterday?:
My local installation also started failing with the same error. Something changed? After installing npm -g install @babel/core @babel/cli
additionally. but still babel error occurred.
STDERR:
npm ERR! code 127
npm ERR! path /Users/runner/hostedtoolcache/node/16.16.0/x64/lib/node_modules/appium
npm ERR! command failed
npm ERR! command sh -c npm run build
npm ERR! > appium@2.0.0-beta.41 build
npm ERR! > babel lib --root-mode=upward --out-dir=build/lib
npm ERR! sh: babel: command not found
{
"error": {
"code": 127,
"summary": "command failed",
"detail": "sh -c npm run build\n> appium@2.0.0-beta.41 build\n> babel lib --root-mode=upward --out-dir=build/lib\nsh: babel: command not found"
}
}
https://dev.azure.com/AppiumCI/Appium CI/_build/results?buildId=22725&view=results is the root CI tasl. https://dev.azure.com/AppiumCI/Appium CI/_build/results?buildId=22711&view=results was ok. This was on Wed 27th 5pm PDT.
I wondered 2.0.0-beta 41 had something initially, but the same error continued with appium@2.0.0-beta.40
part of https://github.com/appium/ruby_lib_core/blob/master/ci-jobs/functional/run_appium.yml:
steps:
- task: NodeTool@0
inputs:
versionSpec: 16.x
displayName: Install Node 16.x to get NPM v8
- script: npm install -g appium@${APPIUM_VERSION}
displayName: Install appium beta
- script: npm install -g mjpeg-consumer
displayName: Install MJPEG Consumer
- script: npm list --depth 2 -g || echo 'ok'
displayName: Installed node dependencies
- script: appium driver install ${APPIUM_DRIVER}
displayName: Install appium driver ${APPIUM_DRIVER}
env:
APPIUM_HOME: $(Agent.HomeDirectory)/appium
I haven’t tried NodeJS 14 and npmv6, so potentially the combination only can work.
Environment
- Appium version (or git revision) that exhibits the issue: ?? maybe 2.0.0-beta.41 release or related??
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: macOS, Linux
- Node.js version (unless using Appium.app|exe): nodejs 16, npm v8.
- Npm or Yarn package manager: npm
- Mobile platform/version under test:
- Real device or emulator/simulator:
- Appium CLI or Appium.app|exe:
Details
npm -g install appium@next
appium driver install xcuitest # etc
then, the installation error occurred
Link to Appium logs
an error after npm -g install @babel/core @babel/cli
https://gist.github.com/KazuCocoa/6155078276649e644e6c7682e276a478
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: 15 (12 by maintainers)
Current workaround: Install npm version v6. i.e.:
$ npm -g install npm@6
. This can work with NodeJS 16 as well. https://github.com/appium/ruby_lib_core/pull/397/files