npm update is not honoring the results of npm outdated

491 Views Asked by At

I ran npm outdated on a project - it showed that there were several outdated packages. So I ran npm update - it updated a few packages but not all. If I run npm outdated again it still shows the remaining packages that are outdated:

Package Current Wanted Latest babel-loader 7.1.1 7.1.1 7.1.2 babel-runtime 6.23.0 6.23.0 6.26.0 chalk 2.0.1 2.0.1 2.1.0 css-loader 0.28.4 0.28.4 0.28.5 eslint 4.2.0 4.2.0 4.5.0 eslint-plugin-react 7.1.0 7.1.0 7.2.1 fs-extra 4.0.0 4.0.0 4.0.1 html-webpack-plugin 2.29.0 2.29.0 2.30.1 material-ui 1.0.0-beta.5 1.0.0-beta.5 0.19.0 postcss-flexbugs-fixes 3.0.0 3.0.0 3.2.0 react-stripe-elements 0.0.2 0.0.2 0.0.7 webpack 3.3.0 3.3.0 3.5.5 webpack-dev-server 2.5.1 2.5.1 2.7.1 webpack-manifest-plugin 1.1.2 1.1.2 1.3.1

If I try to run npm update again, it does nothing!

Why are the two commands telling me different things?

Thanks in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

If you run npm update and some of the packages defined in package.json have their version pinned, it will not update. That is why you see three columns when you run npm outdated. The current installed version, the latest version that matches what is defined in your package.json, and finally, the actual latest version.