Which npm version is correct?

83 views Asked by At

I just install npm 2.11.1,but when I use npm -v command it tells me the version is 2.10.1.

I want to know what's wrong and how can I handle it?

My computer is Windows operating system

1

There are 1 answers

1
dev-masih On

If you install n you can update your npm to the latest stable version by this command

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

UPDATE :
for windows you can download and run the latest MSI. The MSI will update your installed node and npm.