P_man
P_man

Reputation: 11

I get an error running "node -v" in visual studio code

I'm brand new to coding and this is stumping me for some reason. The error that comes up when I type node -v in my visual studio code terminal is 'node : The term 'node' is not recognized as the name of a cmdlet... It works just fine when I run it in command prompt on my computer. I've read everywhere that you have to add it to your path which I'm not sure I did correctly now. I attached some pictures of what the path looks like for the user and system variable. I am hoping someone could give some feedback if this looks right or not. Thanks :)

user variable

system variable

Upvotes: 1

Views: 1193

Answers (1)

stickynotememo
stickynotememo

Reputation: 176

I had this issue when I first got Node. The solution is to restart VSCode, opening new terminal sessions inside VSCode won't help for some reason. You will, of course, have had to add it to PATH which you said you have.

It wouldn't work in command prompt if you haven't added it to PATH so I think your configuration is correct. However, some of your variables are in Appdata/Roaming. I think it's supposed to be in ProgramFiles or ProgramFiles x86, but you can check this by going to the filepath you've put into your environment variables using file explorer, and checking if there's a node.exe or npm.exe file there.

Upvotes: 1

Related Questions