Phonegap Cordova installation Windows
I faced the same problem and struggled for an hour to get pass through by reading the documents and the other issues reported in Stack Overflow but I didn't find any answer to it. So, here is the guide to successfully run the phonegap/cordova in Windows Machine.
Follow these steps
- Download and Install node.js from http://nodejs.org/
- Run the command
npm install -g phonegap
(in case of phonegap installation) or run the commandnpm install -g cordova
(in case of Cordova installation). As the installation gets completed you can notice this:
C:\Users\binaryuser\AppData\Roaming\npm\cordova -> C:\Users\binaryuser\AppData\Roaming\npm\node_modules\cordova\bin\cordova [email protected] C:\Users\binaryuser\AppData\Roaming\npm\node_modules\cordova ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) ├── [email protected] └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Notice the above line you can see the path were the file is mentioned. Copy that path. In my case it is
C:\Users\binaryuser\AppData\Roaming\npm\cordova
so usecd C:\Users\binaryuser\AppData\Roaming\npm\
and typecordova
. There it is, it finally works.- Since the
-g
key value isn't working you have set the Environment Variables path:- Press Win + Pause|Break or right click on
Computer
and chooseProperties
. - Click
Advanced system settings
on the left. - Click
Environment Variables
under theAdvanced
tab. - Select the
PATH
variable and clickEdit
. - Copy the path mentioned above to the value field and press
OK
.
- Press Win + Pause|Break or right click on
After hours of frustration... here's what i discovered.
- Ignore the installation documentation and all the command line, node.js stuff (seriously you will waste hours on this.
- Go to github and simply download the PhoneGap master .zip
- In that zip are project files for window phone, etc platform... just use those templates.
I don't know how such an easy process could have worse documentation. It as if it was written by lawyers.