2
votes

I can't seem to get node & npm available globally. -I installed it with the windows installer -Made sure the path "C:\Program Files\nodejs\node.exe" is in my user path as well as in system path.

userpath: C:\Ruby22-x64\bin;"C:\Program Files\nodejs";"C:\Users\Robin V\AppData\Roaming\npm" (tried it with and without quotes)

systempath: ...;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\Users\Robin V\AppData\Roaming\npm\ - Rebooted multiple times - Ran cmd as administrator

proof env variableproof env variable

"node" still returns the not recognized error

UPDATE:

  • i checked tHKEY_CURRENT_USER\Environment and made sure the "PATH" key type is REG_EXPAND_SZ
  • i negated all paths with a space with " quotes
  • i there are no space between teh semicolons and the paths
  • i execture cmd as administrator

Anything else i can try ?

5
For historical reasons, node is often available as nodejs or iojs instead of node -- have you tried those? The exe looks like its named node, but just to be sure...prekolna
I recommend to reinstall Node.js, my coworker had this problem, it helped.Ginden
Did you install using official installer or otherwise? Could you also please specify which shell you used (cmd, PS, or bash) with exact command and error message it produced.Aleksei Zabrodskii
Might it be you need to run node.exe and not node (explicitly writing out extension in the command)?Aleksei Zabrodskii
@SnK Can you post a screenshot of the info of that file when you right click on it? there are many reasons for why yours isn't working, and you haven't really given people enough information to work off ofJay

5 Answers

1
votes

Can you please try one more thing, move node path to the first entry in the list of PATH strings. Thanks SnK

0
votes

set the C:\Program Files\nodejs\bin directory in window's PATH environment variable

0
votes

Try this one dude if you're using windows:

1.) Search environment variables at your start menu's search box. 2.) Click it then go to Environment Variables... 3.) Click PATH, click Edit 4.) Click New and try to copy and paste this: C:\Program Files\nodejs\node_modules\npm\bin

If you got an error. Do the number 4.) Click New, then browse the bin folder

-1
votes

Add it to the PATH environment variable (under System Properties -> Environment Variables). After this run cmd and echo %PATH% to make sure that the nodejs and npm paths appears correctly. This is what I have in my echo %PATH% (which works fine) : .... ;C:\dev\tools\nodejs\;C:\Users\username\AppData\Roaming\npm; ...

-1
votes

Are you sure you've got the right path? Could it be in C:\Program Files (x86)\nodejs?