Nathan Barel
Nathan Barel

Reputation: 388

'node' is not recognized as an internal or external command - a path issue

This question has already been asked but the solutions were not enough for me. I heve windows-7. when I run 'node -v' in order to check if it installed, it give me this message:

'node' is not recognized as an internal or external command

I added it to the path:

 C:\Program Files\nodejs

and it still not work, even after restart. There is another option - to run this on the command line:

SET PATH=C:\Program Files\Nodejs;%PATH%

it does work, but I have to run this every time I open the command line, and it is quite annoying, especially that I heve another paths that are not recognized and the 'SET PATH=...' does not work for them. this is my path:

C:\Program Files\nodejs ;
C:\Windows\System32\  ;
C:\Program Files\Git;
C:\Program Files (x86)\PostgreSQL\10;
C:\Users\nathan-hp\AppData\Roaming\npm

I also tried to uninstall and then install. I guess I am doing something wrong with the path

Upvotes: 0

Views: 132

Answers (1)

kavigun
kavigun

Reputation: 2365

The other alternative is using setx command but, use it with care as it permanently updates the environment variables:

setx /M PATH "%PATH%;<new-path>"

/m - This sets the variable in the system environment variable

Upvotes: 1

Related Questions