JPil
JPil

Reputation: 301

npm is not recognised as an internal or external command - install using nvm

I am trying to install nodejs and npm on my Windows 10 PC. Below are the steps I followed for the same

  1. Downloaded nvm set up from here
  2. Installed nvm install wizard using nvmsetup.exe
  3. Opened command prompt and typed in 'nvm install v5.1.0
  4. typed in nvm use 5.1.0
  5. typed in node -v and got the response back v5.1.0
  6. but when I tried npm --version I am getting error saying npm is not recognized as an internal or external command

I updated the environment variables to set the PATH C:Program Files\nodejs. Restarted PC, and restarted Command prompt still no luck. Really appreciate any help on this. thanks

Upvotes: 7

Views: 15577

Answers (2)

John
John

Reputation: 1

after execute nvm on, you will have enter image description here

and make sure the target is valid enter image description here

Upvotes: 0

Wylie
Wylie

Reputation: 550

I had the same problem after I switched from one node version to another using nvm use ----. Apparently nvm disabled itself at some point and using nvm on enabled it, now I have access to npm again.

The solution came about from checking this page discussing the same problem

Upvotes: 19

Related Questions