Mysterio Man
Mysterio Man

Reputation: 1737

Appium. Cannot find module 'appium-base-driver'

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

Upvotes: 5

Views: 7914

Answers (10)

Dilip Kumar
Dilip Kumar

Reputation: 1

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?

Upvotes: 0

Kiran Antony
Kiran Antony

Reputation: 250

Please update your Appium version and try again

Upvotes: 0

JC .
JC .

Reputation: 91

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

Upvotes: 0

anurag pattanayak
anurag pattanayak

Reputation: 11

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

Upvotes: 1

eugene.polschikov
eugene.polschikov

Reputation: 7339

@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

Upvotes: 0

zuzeac
zuzeac

Reputation: 11

You can install the base driver by below command:

npm i appium-base-driver

Upvotes: 1

Vitthal Bobade
Vitthal Bobade

Reputation: 366

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
    

Upvotes: 3

Benz MP
Benz MP

Reputation: 1

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.

Upvotes: 0

Kiran Antony
Kiran Antony

Reputation: 250

Try Intall gulp with npm install -g gulp

Upvotes: 0

Narendra Chandratre
Narendra Chandratre

Reputation: 931

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?

Upvotes: 2

Related Questions