Node.JS - 如何从任何路径运行节点命令? [英] Node.JS - How to Run Node Command from any path?
问题描述
我已从此处安装最新的node.js。我看到已经为Node.js设置了%Path%变量。但是,当我从C:\运行节点时,我得到一个节点不是公认的comman。但是节点命令从C:\Program Files(x86)\\\
odejs路径正常工作。如果我设置了Env变量,我可以不从C:\或其他路径中的节点运行Node命令吗?请帮忙。我正在运行一个Win7 X64。
I have installed the latest node.js from here . I see the %Path% variables have been set for Node.js. But, When i run node from C:\ , i get a "Node is not an recognized comman". But node command is working fine from "C:\Program Files (x86)\nodejs" path. Can i not run Node commands from C:\ or Say from an other path if i set the Env variables right? Please help. I am running a Win7 X64.
谢谢,
Faraaz
Thank You, Faraaz
推荐答案
如果运行节点--version
会发生什么?我从来没有尝试过windows.js的node.js,但是如果不行,你的路径会出错。
What happens if you run node --version
? I have never tried node.js from windows but if that doesn't work there is something wrong with your paths.
当你运行 echo%PATH%
?
这篇关于Node.JS - 如何从任何路径运行节点命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!