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

node.jsCordovaNpm

node.js Problem Overview


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"

node.js Solutions


Solution 1 - node.js

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 - node.js

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

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

Solution 3 - node.js

Worked for me by running the command prompt as an administrator

Solution 4 - node.js

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

Solution 5 - node.js

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"

Solution 6 - node.js

As you're using Windows, installation should automatically edit the %PATH% variable. Therefore, I suspect you simply need to reboot your system after installing.

Solution 7 - node.js

Be aware that the Path is case sensitive. I tried setx PATH and it didn't work. In my case it was setx Path. Make sure your CMD run as Administrator.

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

Now just restart your command prompt (or restart the PC) and the node command should be available.

Solution 8 - node.js

Also, try to run nvm on to turn on the node. Worked for me.

Solution 9 - node.js

If you already have node installed, your path variable is set up and you suddenly start getting this error; try updating to the latest version.

This worked for me going from 6.9.2 to 6.10.

Solution 10 - node.js

In windows search bar type "enviroment variable" open it and set path

> C:\Program Files\nodejs;

After adding path in system enviroment variable, If problem still occurs then follow steps

  • Close cmd and open new cmd, try "node" command.
  • For VS code close all windows and reopen then try "node" command.
  • If above steps didn't work then restart system.(this one worked for me)

Solution 11 - node.js

In my case, I'm using NVM and it installed Node v16.2.0, which for some reason has node.exe named as node64.exe. I changed it to node.exe and everything just worked.

Solution 12 - node.js

In my case I was using nvm-windows and JetBrains Rider. The required paths were specified in environment variables, but MSBuild wasn't picking them up. Apparently I haven't rebooted my PC after installing NVM. Rebooting the PC fixed the problem.

Solution 13 - node.js

Please install node through nvm

following command will give you the path where node is installed .

nvm root

Current Root: C:\Users\u725561\AppData\Roaming\nvm

node would be present inside the subdirectory of nvm root .

add the directory C:\Users\u725561\AppData\Roaming\nvm\v12.22.2 to path environment variable.

Solution 14 - node.js

I had the same problem. My solution was just restart :/ If you have this problem, you should just try restart first...

Solution 15 - node.js

enter image description here

For me I just click on empty session and it works for me

Solution 16 - node.js

I tried the solutions above but uninstall and reinstall of nodejs from installer the only one worked for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMeghanaView Question on Stackoverflow
Solution 1 - node.jswebmatoView Answer on Stackoverflow
Solution 2 - node.jsTravisView Answer on Stackoverflow
Solution 3 - node.jsOushView Answer on Stackoverflow
Solution 4 - node.jsDongView Answer on Stackoverflow
Solution 5 - node.jshipertrackerView Answer on Stackoverflow
Solution 6 - node.jsJackView Answer on Stackoverflow
Solution 7 - node.jsADM-ITView Answer on Stackoverflow
Solution 8 - node.jsRobert HovhannisyanView Answer on Stackoverflow
Solution 9 - node.jsErik WatersView Answer on Stackoverflow
Solution 10 - node.jsGAURAV MOKASHIView Answer on Stackoverflow
Solution 11 - node.jsAlphaBetaView Answer on Stackoverflow
Solution 12 - node.jsEternal21View Answer on Stackoverflow
Solution 13 - node.jsTanmay PatilView Answer on Stackoverflow
Solution 14 - node.jshilmidemirtasView Answer on Stackoverflow
Solution 15 - node.jsFahadView Answer on Stackoverflow
Solution 16 - node.jsNickView Answer on Stackoverflow