What version level will npm update vs npm install pick?

45 views Asked by At

I have published a global npm module in the following versions:

0.0.1
0.0.2
1.0.0

First, I installed the npm module globally in version 0.0.1, then I ran npm update -g mymodule.

  • Why did it update to 0.0.2 instead of 1.0.0?
  • When I ran npm install -g mymodule again it updated to version 1.0.0. Why is that?

Do npm update -g and npm install -g update different version levels?

0

There are 0 answers