When I run npm outdated
to see what needs to be updated, I can see in red what needs to be updated:
Now to my knowledge, there are generally two ways to update this. (1) run npm update
, (2) run npm install packagename@latest
(or specific version).
So, next I run npm update
. There are no changed committable files (the file package.json
and package-lock.json
are left untouched).
Now I expect that if I run npm outdated
, it will still show that it needs to be updated. However, this doesn’t happen.
Even if I run npm cache clean --force
, there is no change and the output of npm outdated
DOES NOT reflect that the current version 0.2.37
needs to be updated to 0.2.38
.
- Why does this happen and what workflow should I use to fix this (that is: what do I run to fix all red entries)?
- How can I ensure that
npm outdated
gives consistent results (that is: always show me the red entries, until it is fixed inpackage(-lock).json
)?
PS: I use npm version 10.5.0 on Windows, but I’m just as happy to run the same on Ubuntu.