user3513020
user3513020

Reputation: 21

Is it possible to update NPM using NPM?

I was having a problem with a node module that I installed and I think it is because my node version was out of date. I just went through the process of updating and it's pretty mind-numbingly tedious. I know that the node package manager lets you install updates for other modules, but is it possible to update itself using NPM?

Upvotes: 1

Views: 89

Answers (2)

durum
durum

Reputation: 3404

Yes. Is like another npm package.

npm update -g npm

Simple.

Upvotes: 2

zarkone
zarkone

Reputation: 1355

In general, this:

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

take the answer from this article: http://davidwalsh.name/upgrade-nodejs

Upvotes: 0

Related Questions