You should try some of the suggestions in the link I posted. Sorry, that’s what I meant to recommend. I wasn’t explicit, but trying those could really help you in your situation.
I just thought you would get that intuitively. My bad.
make sure you install it without sudo command as suggested by appium.
after installation, you should be able to see the appium directory. path: ~/.appium to see the hidden files use ls -a command on your HOME directory path.
if it is there by any chance, delete it and then uninstall and reinstall appium again.
also check manually if you see appium execution file in the binary directory. path: /usr/local/bin/appium
Maybe I’m just being an idiot, most likely, but I’m revisiting this now. I’ve attempted to edit the path using Wreed’s suggestion which I also found and attempted to re-install but still Appium isn’t there. When I’m in the home directory as suggested by ido, I am manually checking and Appium isn’t there either. No hidden file present. What else is there to try?
So, let’s dumb this down to make sure I’m getting it right. I’ve checked my lfs but can’t find Appium despite it being present when I do npm i -g appium then npm -g list which returns:
/Users/chaffe/.npm-global/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
my local path:
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
I think the next step is to find where this is installed. Can you try this command?
npm root -g
This will tell you where global modules are installed. Then you should be able to find the appium module and executable, and then link it to you ‘/usr/local/bin’ directory.
So I found Appium within /Users/chaffe/.npm-global/lib/node_modules, /Users/chaffe/.npm-global/bin is the exact location of Appium and Appium doctor, so why or how does it not recognise it if it recognises npm?
point to another path? And if you took the output from the which command and did an ls -l on it, does it show as a symbolic link? If so, the output of the ls -l command will start with the letter ‘l’. Might look something like:
lrwxr-xr-x
At the beginning. If so, then for whatever reason npm failed to create a symbolic link in that path. You can do so yourself to fix it. Come back with the paths from above and I’ll craft you one, or if you’d like to read about them:
so which appium-doctor returns nothing
In regards to ls -l I’m not sure if you mean on npm root -g ls -l this path or another? the response of that is still: /Users/chaffe/.npm-global/lib/node_modules
Which commands should I run to establish the paths necessary?
Two days before I too face the same issue on my windows machine. I am using appium cli and installed using npm i -g appium and no error reported by appium-doctor.
Finally, I uninstalled NodeJS and installed again.
I found https://github.com/appium/appium/issues/6738 (from @wreed) which appears to be the same issue. Attempted ln -fs /Users/chaffe/.npm-packages/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium and got access denied, then n -fs /Users/chaffe/.npm-packages/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium chmod +x /usr/local/bin/appium I get ln: /usr/local/bin/appium: No such file or directory
My apologies. I’ve had to step back from the board as I’ve contracted covid.
However, let me see if I can get you on track. In looking over my machine, I’m realizing that I haven’t asked you how you installed Node/NPM. I’m using NVM (Node Version Manager) so that I can have different versions and switch between them with ease. When I look at my ~/.zshrc, it’s full of references to NVM, and that is how I am seeing ‘appium’ in my $PATH, and how I can call it directly. What is your setup like?