无法将“节点"识别为内部或外部命令 [英] 'node' is not recognized as an internal or external command
问题描述
我一直在使用node.js
v0.6.3
,该本地安装在 Windows Vista 上的C:\Program Files\Nodejs
.我最近升级到了v0.6.6
(通过运行安装程序).似乎它工作了一段时间,但是现在,如果我尝试从任何目录运行node
,我都会得到
I've been working with node.js
v0.6.3
, locally installed on Windows Vista at C:\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 run node
from any directory I get a
节点"未被识别为内部或外部命令
'node' is not recognized as an internal or external command
消息,尽管从C:\Program Files\Nodejs
运行node
确实可行.
message, though running node
from C:\Program Files\Nodejs
does work.
我尝试重新启动,删除节点,重新安装,重新安装0.6.3-似乎没有任何效果.我只是不明白为什么node
无法识别系统路径,尽管node
是从其基本目录工作的?
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, though node
works from its base dir?
推荐答案
系统路径中缺少节点,请在命令行中尝试
Node is missing from the SYSTEM PATH, try this in your command line
SET PATH=C:\Program Files\Nodejs;%PATH%
,然后尝试运行node
要在整个系统范围内进行设置,您需要在系统设置中进行设置-cf- http://banagale.com/changing-your-system-path-in-windows-vista.htm
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
为简洁起见,请创建一个新的系统变量NODEJS
To be very clean, create a new system variable NODEJS
NODEJS="C:\Program Files\Nodejs"
然后在系统变量中编辑PATH
并添加%NODEJS%
Then edit the PATH
in system variables and add %NODEJS%
PATH=%NODEJS%;...
这篇关于无法将“节点"识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!