成功安装后无法识别节点 [英] Node not recognized although successfully installed
问题描述
我尝试在 Windows 7 的全新安装上运行 nodejs . 这就是我所做的:
I try to run nodejs on a brand new installation of Windows 7. This is what I've done:
-
使用Windows Installer安装节点
Install node using the windows installer
确保文件已提取到C:\Program Files (x86)\nodejs\
确保我的Path环境变量包含C:\Program Files (x86)\nodejs\
Make sure that my Path enviorment variable contains C:\Program Files (x86)\nodejs\
打开命令提示符并运行node -v
open up a command prompt and run node -v
这给了我'node is not a recognized ...'
-消息.
我在这里想念什么?
更新
运行echo %path%
会给我一个不包含C:\Program Files (x86)\nodejs\
的目录列表,即使查看系统属性中的环境变量"选项卡也会在路径下显示该目录.太奇怪了.
Update
running echo %path%
gives me a directory listing that doesn't include C:\Program Files (x86)\nodejs\
, even though looking at the "environment variables" tab in the system properties displays it under path. Thats odd.
推荐答案
更新:根据Timos的评论,一种更快的解决方案:重新启动explorer.exe就足够了,您可以在任务管理器中将其停止,然后重新启动".
UPDATE: a quicker solution is per Timos comment: "Restarting explorer.exe is enough, you can stop it in task manager and start it again"
此问题通过重新启动计算机来解决.
This was solved by restarting the computer.
显然,使用节点安装程序可以设置路径,使其在系统属性下可见,但在命令提示符下(运行echo%path%)才可见,直到重新启动计算机.不知道这是Windows还是Node Installer的问题.
Apparently, using the Node installer sets the path so that it is visible under system properties, but not in the command prompt (running echo %path%) until you restart your computer. Not sure if this is a problem with Windows, or the Node Installer.
这篇关于成功安装后无法识别节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!