Kirsten
Kirsten

Reputation: 18086

'node' is not recognized as an internal or external command after installing nvm, node and setting path

I installed NVM from the nvm-setup.zip Then, at the command prompt, I ran

nvm install 8.11.2

Then I ran

nvm use 8.11.2

which output

now using node v8.11.2 (64-bit)

Then I ran

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

However when I type

node

I get

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

Upvotes: 23

Views: 24743

Answers (7)

Sughosh Pandey
Sughosh Pandey

Reputation: 11

Just uninstall the nodejs folder inside the program files

then do nvm use now you can use the node and npm commands

Upvotes: 1

Chief
Chief

Reputation: 963

I encountered this issue after installing nvm and node version 16.5.1. FOr anyone who may have a similar issue.

the command nvm on solved this for me.

Upvotes: 16

Kishan Abhishek
Kishan Abhishek

Reputation: 1

Just run "nvm use version" without quotes..

Upvotes: -1

Rajitha Udayanga
Rajitha Udayanga

Reputation: 1732

Remove/Uninstall your locally installed nodejs and then install node versions thought the NVM.

Upvotes: 0

awan_tan
awan_tan

Reputation: 21

Delete C:\Program Files\Nodejs.
Reinstall nvm.
C:\Program Files\Nodejs is recreated and npm and node command work now.

Upvotes: 2

Kirsten
Kirsten

Reputation: 18086

I removed the following folders ( kirst being my user name)

C:\Users\kirst\AppData\Roaming\npm
C:\Users\kirst\AppData\Roaming\npm-cache
C:\Program Files\nodejs

Then I ran the following at the command prompt ( 8.11.2 being the version I wanted)

Nvm uninstall 8.11.2
Nvm install 8.11.2
Nvm use 8.11.2

Upvotes: 39

Ravi
Ravi

Reputation: 470

Please, can you try once C:\Program Files\Nodejs with double quotes and close the cmd prompts. Re-open cmd prompts and try once.

Upvotes: 0

Related Questions