Edward Edward - 3 months ago 4
Node.js Question

How to find out if new versions of npm-packages exists

I have a

package.json
that contains the following settings for the dependencies:

"dependencies": {
"bootstrap": "3.1.1",
"electron": "1.3.1"
}


I know there are newer versions for boostrap and electron.

I was asking myself: Is there a way to find out if newer versions of the dependencies exists?

In Bower.io I would sipmly run
bower list
which lists installed packages and possible updates and then run
bower update -S
to install the updates.

Is there similar workflow in
npm
?

A way that directly installs newer versions is

"dependencies": {
"bootstrap": "^3.1.1",
"electron": "^1.3.1"
}


and running
npm up
. But there seems to be no command that only lists possible updates for the packages.

Answer

You can check with this command

npm outdated

To check it globally run the following command

npm outdated -g --depth=0

Check more info here

After checking update all outdated package

npm update

Comments