Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.bin/authorize-ios not found when installing appium using npm install -g appium

When I try to install appium using npm install -g appium

I get the message

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

If I run the install again I get

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/appium/build/lib/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/build/lib/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

The first .bin/authorize-ios is indeed not there. I don't know how to fix it. When I install using npm install appium-ios-driver the driver is installed under User/node_modules and not at usr/local/lib/node_modules. I installed npm using brew.

like image 292
MPereira Avatar asked Nov 03 '20 02:11

MPereira


1 Answers

I was able to solve this by installing the NPM 6 (6.14.9 as of this writing)

npm i -g npm@6
npm i -g appium

If you want to lock into a particular version of npm instead of latest then this should get you to a version that should install it

npm i -g [email protected]
like image 169
BoredAndroidDeveloper Avatar answered Sep 19 '22 16:09

BoredAndroidDeveloper