Node node is not recognized as an internal or external command, operable program or batch file

I am using PhoneGap/Cordova. I have also installed everything properly but an error comes up as:

"node is not recognized as an internal or external command"

Can someone explain to me why this is showing up? and how can I solve this?

Home  »  Node   »   Solving node is not recognized as an internal or external command

Node node is not recognized as an internal or external command, operable program or batch file

Have you ever got this node error “node is not recognized as an internal or external command”? I got into the problem when i found this node error in my command line. This error message can be daunting. I searched the Internet and came to find out that the problem is this node executable was not in my PATH. It was missing for sure.

So I added the node to the path and then restarted the visual studio only to see that the application is working once again. Here are the steps that you will need to follow to get rid of the “the node executable was not in my PATH” error.

  • Open control panel => system & security => system => advanced system settings => environment variables
  • In “User variables” or “System variables” look for variable PATH and include Node JS folder path. Often it is C:\Program Files\nodejs folder;. If you don’t get variable, then don’t hesitate to create it
  • Restart your personal computer

The executable code for the application must be present in the C:\Program Files\nodejs folder. If you want to check your PATH, then you can quickly check it by right-clicking on the My Computer in File Explorer and then select Advanced System Settings.

Once the dialog window opens you need to visit the Advanced tab, and at the very end you will find the Environment Variables button.

Node node is not recognized as an internal or external command, operable program or batch file

Just tap on the button and the dialog variables will come up and it will include your system’s PATH variable. Now, make sure that the node path is included if it has not yet been added already.

Node node is not recognized as an internal or external command, operable program or batch file

Once you have done that, restart the Visual Studio or once again open a new command prompt. In the word bar, enter 'node -v' to copy the node version which is already installed. Another way to enter the PATH to any other application is directly from the command line.

Open the command line and type, assuming this is your original path, “SET PATH=C:\Program Files\Nodejs;%PATH%”.

So these are a few ways to avoid the “the node executable was not in my PATH” error. I hope this will surely help you out and feel free to comment down below with your feedback.

Posted on: October 29, 2021 by Deven


In this article, you will learn about how to fix node is not recognized.

If you ever faced a problem like “node is not recognized as an internal or external command” after installing node.js. Don’t panic! It’s a common problem and its solution is very easy. You may face this kind of unwanted situation because of not setting the path of the node as an environment variable. Let me show you the solution of it in the following steps:

Step 1:

For the first step, you have to open control panel and then click on the system & security from there click on system and then advanced system settings and finally environment variables.

You will get an interface like at the picture when you follow these steps Open control panel—>system & security—> system—>advanced system settings—>environment variable.

Step 2:

In this step, when you click on environment variables a new dialog box will open in front of you. One is user variables and another is system variables. In there click on PATH and then click on edit button. Another dialog box will open for you and there click on new and set C:\Program Files\nodejs this as nodejs address.

After setting up PATH you have to click ok from all the dialog boxes.

Step 3:

In this step, you have to do one final thing and that is you have to restart your code editor or computer and open a fresh command-line interface. After doing so, if you write node again in the command line your problem will be solved.

Note: The version of nodejs may be different based on the period of time you install nodejs into your computer.

There’s an alternative way of solving this issue by using the command line. All you need to do is write this command in the command line SET PATH=C:\Program Files\Nodejs;%PATH%Note: Make sure that your command line console is running as an administrator.

This is all about the node is not recognized and the desired solution for it.

Share on social media

//

PreviousNext

Why node is not working in cmd?

Make sure the node path is added, if not added it. After doing this restart Visual Studio or open a fresh command prompt. From the command prompt type 'node -v' to echo the node version installed. You can also add the path to node or any other application directly on the command line.

Why is node not recognized in Visual Studio code?

1 Answer. Show activity on this post. You must click the Kill Terminal button (highlighted) and then restart VS Code and node will start working again. Best on making a change of system environment variable Path is restarting Windows to make sure that really all processes make use of the modified Path variable.

How do you resolve is not recognized as an internal or external command operable program or batch file?

You can resolve this issue in three ways:.
First, use the full path of the executable file to launch the program..
Second, add the program path to Windows environment variables..
Finally, move the files to the System32 folder..

How do you fix npm is not recognized?

Fixing npm is not recognized error on Windows OS If you're calling npm from the VSCode terminal, you need to restart VSCode first before trying again. If you still get the error, then try restarting your computer first. The error should be gone after you restart.