Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'phonegap' is not recognized as an internal or external command

I am trying to install phonegap 3.1 version using node.js, Command line interface.

Phonegap got installed on the machine, but I am not able to use phonegap command. When I list packages, I can see phonegap, but can not run command to create project.

System config : OS : WIN XP, node version : 0.10.22, npm version : 1.3.14, phonegap version : 3.1.0,

EDIT :

Error Message

C:>phonegap

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

C:>npm -g list phonegap

C:\Documents and Settings\vishal.kardode\Application Data\npm └── [email protected]

like image 582
Vishal Kardode Avatar asked Nov 21 '13 08:11

Vishal Kardode


3 Answers

I got the same error and adding the path to the Environment Variables did the trick.

Just pay attention to the correct path, because in my case it is different from the question.

Look what you get when you do: npm -g list phonegap

In my case it displays: c:\usr\local

So this is the path you need to add to the PATH variable under User variables on the Environment Variables.

like image 168
nmoliveira Avatar answered Sep 28 '22 04:09

nmoliveira


Delete path variable from "users variable". That worked nicely for me.

like image 29
Nizam Uddin Sikder Avatar answered Sep 28 '22 02:09

Nizam Uddin Sikder


change the name from phonegap to cordova You can use the following command to create a project through command line cordova create hello com.example.hello HelloWorld

like image 32
SohelElite Avatar answered Sep 28 '22 02:09

SohelElite