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

I am trying to install cordova 5.1.1 version using node.js, Command line interface.

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

System config : OS : windows 8, npm version : 1.3.21, Cordova version : 5.1.

Error Message

C:>cordova

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

Upvotes: 1

Views: 12558

Answers (2)

Jaydeep Kataria
Jaydeep Kataria

Reputation: 867

Path set to Environment variable where Cordova install

$ which cordova node_modules/.bin $ cordova -v 3.5.0-0.2.4

Upvotes: 0

Need to set environment variable.

Start -> Control Panel -> System and Security -> System -> Environment variables

or

Mycomputer -> Right Click -> properties -> Advance System settings -> Environment variables

under User variables for youruser:

Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT% \System32\WindowsPowerShell\v1.0\;C:\Users\user1\AppData\Roaming\npm`

Temp: %USERPROFILE%\AppData\Local\Temp Simple copy pasting wont work.

If Still Not getting need reset/create the DWORD

1.Click the Start menu and type "regedit" on the search box. This will launch the Windows Registry Editor program.

2.Enter to the following Registry entry: HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings

3.Select the "Enabled" entry in the right side window. If this entry is there, right-click and select "New" followed by "DWORD Value." Name the value "Enabled."

4.Right-click the "Enabled" entry and click "Modify."

5.Change the number in the "Value" box to "1." This will re-enable WSH.

6.close all opened cmd windows and open a new window.

Upvotes: 3

Related Questions