'appium' is not recognized as an internal or external command, operable program or batch file
Asked Answered
I

6

6

Trying to install appium on Windows using the following command: npm install -g appium

But I am getting following error.Please give me some solutions to solve this problem.Just i downloaded appium for windows then I tried npm install -g appium command in command prompt.

    C:\Users\Gideon>npm install -g appium
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/vojtajina/traceur-compiler) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/vojtajina/traceur-compiler) undefined
npm ERR! git clone git://github.com/vojtajina/traceur-compiler undefined
npm ERR! git clone git://github.com/vojtajina/traceur-compiler undefined
\


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appi
um\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild

|
C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mod
ules\bufferutil>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\
\..\..\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 PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
 ERR! cwd C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\w
s\node_modules\bufferutil
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\
appium\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild


C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mod
ules\utf-8-validate>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-
bin\\..\..\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 PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_module
s\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
-


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_
modules\socket.io\node_modules\engine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

|
C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\n
ode_modules\engine.io\node_modules\ws>node "C:\Program Files\nodejs\node_modules
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
|
> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node
_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\n
ode_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\n
ode_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws>node
"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
ode-gyp\bin\node-gyp.js" rebuild
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35
","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.1
0.35","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35"
,"npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35"
,"npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35"
,"npm":"1.4.28"})
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "appium"
npm ERR! cwd C:\Users\Gideon
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ENOGIT
npm ERR! not ok code 0


C:\Users\Gideon>appium 

'appium' is not recognized as an internal or external command, operable program or batch file.

Isaisaac answered 2/4, 2015 at 1:48 Comment(1)
What do you mean by you downloaded appium for windows then i tries npm install -g appium?Thereinto
N
3

Thanks for valuable inputs!

I am adding further solution.

While installing

npm install -g appium

by default system variable is set to C:\Program Files\nodejs\ and this gives you error:

'appium' is not recognized as an internal or external command, operable program or batch file.

To resolve above error you need to give system variable is C:\Program Files\nodejs, so remove \ if you are using OS Windows10, otherwise give semicolon end of the syntax, like as follow: C:\Program Files\nodejs;

Hope this solved the problem!

Nessus answered 21/3, 2018 at 5:27 Comment(0)
R
15

Even I struggled for a day, it finally worked.

NPM, by default will get installed in C:\Program Files\nodejs

But other required node modules will get installed in C:\Users\UserName\AppData\Roaming\npm

The System Environment's PATH variable will be set to C:\Program Files\nodejs and not in C:\Users\UserName\AppData\Roaming\npm, so kindly add this directory to the PATH variable.

Setting another directory

Then copy the appium folder which is downloaded
From: C:\Users\User\AppData\Roaming\npm\node_modules
To: C:\Program Files\nodejs\node_modules\npm\node_modules

Then the command appium --version should work globally.

Tested twice, working for me, hope it helps everyone.

Regards, Vineeth

Royo answered 13/7, 2019 at 13:0 Comment(0)
N
3

Thanks for valuable inputs!

I am adding further solution.

While installing

npm install -g appium

by default system variable is set to C:\Program Files\nodejs\ and this gives you error:

'appium' is not recognized as an internal or external command, operable program or batch file.

To resolve above error you need to give system variable is C:\Program Files\nodejs, so remove \ if you are using OS Windows10, otherwise give semicolon end of the syntax, like as follow: C:\Program Files\nodejs;

Hope this solved the problem!

Nessus answered 21/3, 2018 at 5:27 Comment(0)
S
1

If you install appium through command npm install -g appium and showing error

'appium' is not recognized as an internal or external command, operable program or batch file

Add a new value to path variable in environment variable(Control panel-> advanced settings)

C:\Users\YourUsername....\AppData\Roaming\npm\node_modules\appium\node_modules\.bin\
Savagism answered 8/5, 2019 at 6:0 Comment(0)
K
0

Sounds like you might need to check your system's PATH variable.

Control Panel -> System -> Advanced -> Environment Variables -> System Variables -> select PATH -> Edit ->

Mine has:

C:\Ruby193\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Hewlett-Packard\SimplePass;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files (x86)\SimpleIDE\propeller-gcc\bin;c:\python27;c:\python27\scripts;C:\Program Files\nodejs;C:\Program Files (x86)\Git\cmd

Note that I had to manually add the one for Ruby, Python and python\scripts, Nodejs, Git\cmd, ...

You might need to do that to and then reboot to put those into place.

Kythera answered 2/4, 2015 at 1:56 Comment(0)
H
0

You can also try these steps after installing Node.js:

1) Click on the Start button
2) Search Node.js command prompt and open it
3) Type command npm install -g appium (and it will start installing)
5) Further more, close all the Windows cmd and start a new one
6) Search appium -v to check if it's installed.

Then you won't face the problem. I have struggled for a day, then after following these steps it worked.

Hollywood answered 30/7, 2020 at 8:54 Comment(0)
S
0

I have given answer here for nodemon. But the same will for appium too. To fix the issue follow from step 2 - Answer Link

Shipment answered 10/12, 2020 at 5:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.