Roshdy Roshdy - 2 years ago 208
Android Question

How to fix 'cordova' is not recognized in command line - windows 8?



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

My Environment Path

\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files (x86)\Git\cmd
;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Windows Kits\8.
1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\B
inn\;C:\Program Files\Microsoft\Web Platform Installer\;**C:\Program Files\ANT\apa
che-ant-1.9.3\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Development\sdk\tools

NB: I have read every available tutorial, followed at least 10 of them, read all the similar questions about 'phonegap' not recognized,..etc. I have my 'Enabled' registry set to 1 as some solutions have suggested, re-installed 'phonegap' & 'cordova' through npm install -g phonegap, and same for 'cordova', and I still can't get them to run.


I copied an old phonegap application that I made on another PC, and I can run it through just fine. Hope this would clear anything up.

Answer Source

You do not need to add any cordova folder to the path.

cordova command is a nodejs npm script, what you need is to have the npm folder in your path :


or if it does not work, use instead


(replace YourUserName with the name of your user profile)

What's strange is that I don't remember I had to change it manually, I think it should be added automatically when installing node and npm.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download