I am new to appium using javascript and to install appium I am following this link Setting up appium with javascript

So when I installed appium-doctor and ran it I got an error.

info AppiumDoctor Appium Doctor v.1.7.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: C:\Program 
info AppiumDoctor  ✔ Node version is 8.11.3
info AppiumDoctor  ✔ ANDROID_HOME is set to: 
info AppiumDoctor  ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_171
info AppiumDoctor  ✔ adb exists at: 
info AppiumDoctor  ✔ android exists at: 
info AppiumDoctor  ✔ emulator exists at: 
info AppiumDoctor  ✔ Bin directory of %JAVA_HOME% is set
info AppiumDoctor ### Diagnostic for necessary dependencies completed, no 
fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor  ✖ opencv4nodejs cannot be found.
info AppiumDoctor ### Diagnostic for optional dependencies completed, one 
fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the 
following manually:
WARN AppiumDoctor  ➜ Why opencv4nodejs is needed and how to install it is: 
info AppiumDoctor
info AppiumDoctor ###
info AppiumDoctor
info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have 
been applied!
info AppiumDoctor

From the above warning, I understood that I need to install opencv4nodejs. So in cmd, I entered "npm I opencv4nodejs"

So when I entered that I got one more issue which I am not able to understand because it is telling me to install python which I don't know why? Because I am using javascript to write the code why there is a need to install python.

> heapdump@0.3.12 install C:\Users\Dbaux\node_modules\heapdump
> node-gyp rebuild

C:\Users\Dbaux\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the 
PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Dbaux\node_modules\heapdump
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> opencv-build@0.0.15 install C:\Users\Dbaux\node_modules\opencv-build
> node ./install.js

info install if you want to use an own OpenCV installation set 
info install library dir does not exist: C:\Users\Dbaux\node_modules\opencv-build\opencv\build\lib\Release
info install running install script...
ERR! Error: Command failed: cmake --version
'cmake' is not recognized as an internal or external command,
operable program or batch file.

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Dbaux\package.json'
npm WARN Dbaux No description
npm WARN Dbaux No repository field.
npm WARN Dbaux No README data
npm WARN Dbaux No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.12 (node_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.12 install: `node-gyp rebuild`

npm ERR! errno 1
npm ERR! opencv-build@0.0.15 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build@0.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dbaux\AppData\Roaming\npm-cache\_logs\2018-12- 

And please let me know if the documentation which I am following is correct or not.


Looking at your error after running "appium-doctor"

  • I will say please remove white speaces from all path which you are using. [Mandatory]

  • I referred earlier this link to have correct installation for JavaScript. and all the things started working for me!

All the best!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.