'node' is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova

I am using phonegap/cordova.

Everthing is installed propelry i.e cordova, phonegap, ant,sdk,jdk.

But now it says "node is not recogzed as an internal or external command"


Solution 1:

In Windows, you need to set node.js folder path into system variables or user variables.

1) open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables

2) in "User variables" or "System variables" find variable PATH and add node.js folder path as value. Usually it is C:\Program Files\nodejs;. If variable doesn't exists, create it.

3) Restart your IDE or computer.

It is useful add also "npm" and "Git" paths as variable, separated by semicolon.

Solution 2:

Great answers, but you could just open the command prompt and type in

SET PATH=C:\Program Files\Nodejs;%PATH%

Solution 3:

Worked for me by running the command prompt as an administrator

Solution 4:

Add a system variable named "node", with value of your node path. It solves my problem, hope it helps.

Solution 5:

If you install Node using the windows installer, there is nothing you have to do. It adds path to node and npm.

You can also use Windows setx command for changing system environment variables. No reboot is required. Just logout/login. Or just open a new cmd window, if you want to see the changing there.

setx PATH "%PATH%;C:\Program Files\nodejs"