Appium install returns a non-zero exit code with NPM7
See original GitHub issueThe problem
Appium fails to install or at least returns a non-zero exit code while installing
Environment
- Appium version (or git revision) that exhibits the issue: 1.19.0
- Last Appium version that did not exhibit the issue (if applicable): Unsure - maybe 1.11.0
- Desktop OS/version used to run Appium: OSX
- Node.js version (unless using Appium.app|exe): v15.2.1
- Npm or Yarn package manager: npm@7.0.10
- Mobile platform/version under test: N/A
- Real device or emulator/simulator: N/A
- Appium CLI or Appium.app|exe: CLI
Details
When running the following commands on a fresh OS Catalina install:
brew install node
npm install -g appium
it errors with
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
However - if I go to run appium it does appear to launch. We’re installing appium through Packer so the fact that it errors but is still installed is not ideal. I’m also not 100% convinced the install is complete because of this error but I can’t be sure.
Someone else saw this same behavior here
Other notable things:
- Since we’re doing this with packer I can say that the OS is new and the test is repeatable
- I tried downgrading node but that does not seem to have an effect until v1.11.0. It also doesn’t seem like I can update it to the latest
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Failed on appium installation from command 'npm install
I have some problem to install appium with command 'npm install -g appium' and its shown a message such as 'ENOENT: no such...
Read more >Installing Appium via npm throw an error of "permission ...
This one command solved the problem. sudo npm install -g appium --unsafe-perm=true --allow-root. Latest: To install the latest version of ...
Read more >Troubleshooting - Appium
General. Make sure you've followed the getting started steps in the README; Make sure your system is set up appropriately (i.e., XCode is...
Read more >Error while installing appium in macbook via terminal
Hello Everyone, I was trying to install appium via terminal in Macbook but ... will terminate the Node.js process with a non-zero exit...
Read more >“npm ERR! cb() never called! when I create next app” Code ...
try below command first and //then again install the required package you were ... Command '('lsb_release', '-a')' returned non-zero exit status 1. npm...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to install the
authorize-ios
with appium 1.19.0 on my local vianpm install -g
. I guess npm failed to create the file in the installation process because of write permission.This should be fixed for npm 7 starting with appium v1.20.0+ too.