How can I update npm itself?
node.jsWindowsNpmnode.js Problem Overview
I am trying to update npm itself:
npm uninstall npm -g
Responds with:
unbuild npm@2.12.1
But when I go:
npm --version
I get 1.4.28? How to upgrade the npm itself?
node.js Solutions
Solution 1 - node.js
By using this command you can update npm to the latest release by using npm itself :
npm i -g npm@latest
Solution 2 - node.js
You can try this:
> cd /usr/lib/node_modules > > npm install npm@latest
Edit:
npm install -g npm
worked for me.
Solution 3 - node.js
See which version you have
npm -v
Install the newest npm update
npm install -g npm@latest
Upgrade to the most recent release
npm install -g npm@next
Upgrading on Windows Microsoft wrote a small command-line tool to automate the steps below. You can go and download it here