node is not recognized as an internal or external command but is in PATH

Although I've follow suggestions from:

I'm having an strange issue: Resume, although node path is list in Path, it doesn't find node.

Workflow:

Microsoft Windows [Version 6.3.9600]    //Running CMD on windows 8.1 
(c) 2013 Microsoft Corporation. All rights reserved.

I followed suggestions in SO, adding variable to Environment Variables, and it's display Ok in Path:

C:\Users\myUser>path
PATH=c:\Program Files (x86)\nodejs ; (...omitted...) //So folder is there

Next line will fail

C:\Users\myUser>call jasmine-node spec  
'node' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\myUser>cd "c:\Program Files (x86)\nodejs" //So I move to the folder list before...

But if I move to folder list in Path, then it works OK.

c:\Program Files (x86)\nodejs>call jasmine-node spec
>  (...omitted...) //Exec OK.

c:\Program Files (x86)\nodejs>node
>   //Exec OK. Waiting...

It seems contradictory.

The nodejs directory in your PATH isn't recognized because there's a space before the semicolon, so Windows is looking for a directory with a space at the end of the name, which doesn't exist.

If you did npm install jasmine-node -g you should just need to do jasmine-node spec (no call prefix).

;C:\Program Files\nodejs\

Slash after \nodejs\ worked for me

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.

Error: 'node' is not recognized as an internal or external command

The problem is may be the node is not installed on the machine in which the application is running.

Then install it and set the environment variable for nodejs.

Or

One more reason can be the nodejs path not set in the environment variable.

Check with the following - open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> Path

the nodejs path should be available here. If not available then add the following:

C:\Program Files (x86)\nodejs OR C:\Program Files\nodejs

Now Re-Run the application and the Error got resolved.

I just correct the exact same problem. It comes from the multiple entries in the PATH. It wouldn't be a problem, but I had 2 entries for USER PATH and one for SYSTEM PATH.

So I cleaned the PATH by deleting the user path & merging it in the system PATH. It works like a charm now ! :D

Usually the environment variables are not effective till a system Restart.

I suggest a System Restart for all those who face the same issue when doing a clean install.

This worked for me.