I'm on MacBook Air HighSierra v10.13.4.
I installed node from https://nodejs.org/ and it gave me npm@5.6.0
.
I want to upgrade npm to the current lastest version.
So I've tired npm i npm@latest -g
, npm i npm -g
and sudo npm i npm -g
.
It returns
/Users/sandeep/.npm-global/bin/npm -> /Users/sandeep/.npm-global/lib/node_modules/npm/bin/npm-cli.js
/Users/sandeep/.npm-global/bin/npx -> /Users/sandeep/.npm-global/lib/node_modules/npm/bin/npx-cli.js
+ npm@6.4.0
updated 1 package in 12.452s
But no good when I run npm -v
it returns me 5.6.0
.
But when i run npm list --depth=0 -g
it shows npm@6.4.0
.
Can someone pls help me with this ?