'node' is not recognized as an internal or external command
Solution 1
Node is missing from the SYSTEM PATH, try this in your command line
SET PATH=C:\Program Files\Nodejs;%PATH%
and then try running node
To set this system wide you need to set in the system settings - cf - http://banagale.com/changing-your-system-path-in-windows-vista.htm
To be very clean, create a new system variable NODEJS
NODEJS="C:\Program Files\Nodejs"
Then edit the PATH
in system variables and add %NODEJS%
PATH=%NODEJS%;...
Solution 2
Nodejs's installation adds nodejs to the path in the environment properties incorrectly.
By default it adds the following to the path:
C:\Program Files\nodejs\
The ending \
is unnecessary. Remove the \
and everything will be beautiful again.
Solution 3
Go to the folder in which you have Node and NPM (such as C:\Program Files (x86)\nodejs\
) and type the following:
> set path=%PATH%;%CD%
> setx path "%PATH%"
From http://www.hacksparrow.com/install-node-js-and-npm-on-windows.html
Solution 4
Everytime I install node.js it needs a reboot and then the path is recognized.
Solution 5
Watch out for other paths ending in \ too. I had this:
...bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\nodejs\
and changed it to this:
bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\nodejs
removing the final \, but it still didn't work. The previous path, for the Web Platform Installer, had a trailing \ too. Removing that fixed the problem.
sellarafaeli
Updated on July 09, 2022Comments
-
sellarafaeli almost 2 years
I've been working with
node.js
v0.6.3
, locally installed on Windows Vista atC:\Program Files\Nodejs
. I recently upgraded to (by running the installer for)v0.6.6
. It seemed like it worked for a while, but now if I try to runnode
from any directory I get a'node' is not recognized as an internal or external command
message, though running
node
fromC:\Program Files\Nodejs
does work.I tried rebooting, removing node, reinstalling, reinstalling 0.6.3 - nothing seems to work. I just don't get why
node
fails to recognize system path, thoughnode
works from its base dir?