Appium 2.0 - Location of Driver Install Causing Issues

I’m using Appium 2.0.0-beta.27 with Node v14.20 and npm v8 and WebDriverIO v7.

I’m successfully downloading the Windows Appium Driver, but the way our repo works, it all gets installed in the root /node_modules/ of the repo.

Our E2E testing folder is deeper in the repo in ./src/E2E.

When running using WebDriverIO to start the Appium server, I get the following error:
Could not find a driver for automationName ‘windows’ and platformName windows’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find a driver installed at root/src/E2E/node_modules/appium-windows-driver

It can’t find it because it’s actually downloaded at root/node_modules.

Is there a solution to this issue?

Just change your repo to work in the industry standard way. You should be installing windows appium driver in ./src/E2E/node_modules.

Why create such headaches for yourself?

Working in a Monorepo and using Yarn workspaces, we have one node_modules at the root. I don’t think this is a headache (in most cases) and having one node_modules at the root is very common throughout the industry (from what I’ve seen).

Even Appium has multiple node_modules. You’ve configured things so they won’t work. I’m asking you to change that so they work. If some misplaced ideology keeps you from doing that I don’t think anyone can help you.