Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Error: Cannot find module 'eslint-config-appium' while running ./Scripts/bootstrap.sh #11

Closed
aakashRepo opened this issue Jun 7, 2017 · 9 comments

Comments

@aakashRepo
Copy link

Getting error while running command './Scripts/bootstrap.sh' under directory:
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

Error StackTrace:
Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
Error: Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
at ModuleResolver.resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/util/module-resolver.js:74:19)
at resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:515:25)
at load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:532:26)
at configExtends.reduceRight (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:424:36)
at Array.reduceRight (native)
at applyExtends (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:408:28)
at Object.load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:566:22)
at loadConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:63:33)
at getLocalConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:130:29)
at Config.getConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:260:26)

@steinwelberg
Copy link

I experience the same problem. Somehow when the WebDriverAgent project is build the ESLint checks for Appium are also triggered..

@imurchie
Copy link
Contributor

Use the -d flag, as the documentation says.

@BoazWarshawsky
Copy link

Use -d where?
./Scripts/bootstrap.sh -d
?

@imurchie
Copy link
Contributor

Yes. ./Scripts/bootstrap.sh -d

@deepirms2619
Copy link

when i tried with ./Scripts/bootstrap.sh -d it says only Fetching dependencies. Can you please suggest how to #resolve "Cannot find module 'eslint-config-appium'"

QAMacMini2:WebDriverAgent qaadmin$ Scripts/bootstrap.sh
Fetching dependencies
Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN react-dom@15.6.2 requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN web-driver-inspector@1.0.0 No repository field.

up to date in 3.201s
Validating Inspector
No errors!
Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
Error: Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
    at ModuleResolver.resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/util/module-resolver.js:74:19)
    at resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:515:25)
    at load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:532:26)
    at configExtends.reduceRight (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:424:36)
    at Array.reduceRight (<anonymous>)
    at applyExtends (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:408:28)
    at Object.load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:566:22)
    at loadConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:63:33)
    at getLocalConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:130:29)
    at Config.getConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:260:26)

QAMacMini2:WebDriverAgent qaadmin$ ./Scripts/bootstrap.sh -d
Fetching dependencies

@imurchie
Copy link
Contributor

@deepirms2619 Your output there clearly shows that you are not using -d. Add it and it should work fine.

@surajsalunkhe
Copy link

@imurchie I am also facing the same issue.
When I use the command ./Scripts/bootstrap.sh -d
it is displaying "Fetching dependencies" only.
If used without -d it is showing "Cannot find module 'eslint-config-appium"

@imurchie
Copy link
Contributor

imurchie commented Jan 2, 2018

If the dependencies have already been fetched, nothing will happen other than saying Fetching dependencies. You can delete the Carthage directory and re-retrieve the dependencies.

The Cannot find module error is expected if you don't use -d, which for Appium you should never need to do.

@surajsalunkhe
Copy link

Issue resolved using following steps

  1. clear the node and all related files.
  2. Install the latest node using homebrew> brew install npm
  3. Install the libimobiledevice > brew install libimobiledevice --HEAD
  4. Install ios-deploy: npm install -g ios-deploy
    5.Install appium 1.7.1 and go to path "/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"
    6.Run command "mkdir -p Resources/WebDriverAgent.bundle"
  5. Run command "./Scripts/bootstrap.sh"
    All necessary dependancy will get downloaded.
    @imurchie No need to use -d in script.
    dependencies_log.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants