5

My appium GUI was working perfectly fine until today. When I tried to start appium I am getting this error. I don't know how to get around it. So any suggestions / solutions highly appreciated.

    Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' appium/build/lib/main.js --pre-launch --debug-log-spacing --automation-name "Appium" --platform-name "Android" --platform-version "6.0" --app "/Users/iamtheuser/fitbit/automation/artifacts/myapp.apk" --language "en" --locale "US"

Error: Cannot find module 'appium-base-driver'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (lib/main.js:7:58)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3
Jafar Raza
  • 139
  • 1
  • 8
Mysterio Man
  • 1,667
  • 1
  • 14
  • 17

10 Answers10

3

Install Appium Doctor and investigate whats wrong in it.

  1. Install Appium Doctor by below command:

    npm install appium-doctor -g
    
  2. Use Appium Doctor by below command:

    appium-doctor -h
    
Vitthal Bobade
  • 356
  • 3
  • 12
2

It seems you might :

  1. updated appium version
  2. might updated all other installed/removed gems/dependancies like nodeJS

Do you remember what activity have you done?

1

You can install the base driver by below command:

npm i appium-base-driver
Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
zuzeac
  • 11
  • 1
1

You can install appium-base-driver by running following command from your command prompt

npm i appium-base-driver

If still the error is there then try installing it globally using below command

npm install -g appium-base-driver

If its not adding packages try with

npm install -g gulp
Shahbaz A.
  • 4,047
  • 4
  • 34
  • 55
0

Try Intall gulp with npm install -g gulp

Kiran Antony
  • 190
  • 1
  • 15
0

The issue has happened because you might have updated java-client but not the appium server.

Say if your java-client version is 6.0.0-BETA4, you need to use Appium v1.7.2

Please update how you resolved this issue.

Benz MP
  • 1
  • 2
0

@Mysterio Man, hi . Could You please share what versions: java-client/appium GUI do You use ? I'd recommend to try the following alternatives:

In my proj I'm using dependency

 <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>7.0.0</version>
    </dependency>

Works fine for me.
And also installing appium i accurately followed this step-by-step setup instruction . Didnt face any issues. In worst case- might be helpful to reinstall everything from scratch. Let me know if You have resolved the issue. Regards, Eugene

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44
0

Hey I also had the same issue,

  1. check the node version you have
  2. check if you have installed command line version of appium [there might be a chance of conflicts if both cli and gui are installed]
  3. final option would be better uninstall node and appium & re-install both.

Cheers, Have a great day

JC .
  • 91
  • 5
0

Please update your Appium version and try again

Kiran Antony
  • 190
  • 1
  • 15
  • please provide more detail in your answer like how it should be updated or at least why it's necessary to update. Your current answer can be a simple comment. – Saeed Zhiany Nov 06 '19 at 12:19
  • Most of the Appium server client related issues are related to version variations and the correlations. I have been working with Appium for 4 years and most of the issues are resolved when updated to the latest version of Appium. That is my answer. looks like simple but values lot.please refer Appium forums for latest versions and the procedure how to update. Knowing how to install and update or degrade versions are basic knowledge to be had. – Kiran Antony Nov 07 '19 at 06:30
0

let's try the global installation again. please follow these steps:

move out of your project directory entirely to somewhere else on your system cd ~ uninstall appium npm uninstall -g appium unset APPIUM_HOME export APPIUM_HOME="" rm -rf ~/.appium install appium npm install -g appium@next confirm no drivers/plugins installed appium driver list (should show none installed) install driver appium driver install uiautomator2 run appium appium what happens when you do these steps?

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 17 '22 at 18:14