Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.JS - How to Run Node Command from any path?

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.

Thank You, Faraaz

like image 389
nfa379 Avatar asked Nov 26 '11 11:11

nfa379


3 Answers

I had the exact same problem, but in my PATH variable I had: C:\Program Files\nodejs\. After changing it to C:\Program Files\nodejs I could access it from anywhere.

like image 83
Victor Priceputu Avatar answered Oct 28 '22 01:10

Victor Priceputu


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.

What do you get when you run echo %PATH%?

like image 21
respectTheCode Avatar answered Oct 28 '22 00:10

respectTheCode


You should check if the path C:\Program Files (x86)\nodejs is present in your %PATH. If not, add it via the system properties (persistent change). In any case, restart your command prompt, it'll reload the %PATH variable. If you're lucky, it should work now :)

like image 35
pomeh Avatar answered Oct 28 '22 00:10

pomeh