-
Notifications
You must be signed in to change notification settings - Fork 3k
Strange "npm view" result #8476
Comments
@pauldijou This is part of |
Got it! Thanks for the answer @kenany |
Hey @kenany, sorry, quick bonus question, if I run
Do you think it's normal to have a |
@pauldijou I guess it does look a bit odd. |
Agreed @kenany, but if I run |
@pauldijou Oh, from here I was under the impression that |
@kenany I'm not talking about globally installed packages, here {
"name": "whatever",
"dist-tags": {
"latest": "1.0.1",
"beta": "1.0.2"
},
"versions": [
"1.0.0",
"1.0.1",
"1.0.2"
]
} And you have |
I will reopen the issue after doing a more in-deep analysis. I truly think to something is wrong with |
We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there. For more information about our new issue aging policies and why we've instituted them please see our blog post. |
Today, around 5PM UDT, I played with
npm view
both with CLI and programmatic API and I got some strange results... Runningnpm view npm
inside my shell returned (lot of stuff removed):And running the following code to display the last NPM version:
Output the same stuff as before assigned to a
2.11.1
key.So, here is the question. Maybe I got it wrong, but why is
2.11.1
considered the last version (both innpm.commands.view
and in thedist-tags
object) even if a2.11.2
has been created (both inversions
array andtime
object)?Checking NPM website confirm the
2.11.1
as the last version. But I can actually install2.11.2
by runningnpm install npm@2.11.2
.Is that linked to the fact that it's a pre-release on GitHub? Or because it was published with a tag different than
latest
?Why is it bothering me? Because I'm trying to figure the best version of a package to install but I got a conflict: if I have
npm: ^2.11.0
inside mypackage.json
, checking the best version according to SEMVER inside theversions
array will return me2.11.2
but this version is supposed to be greater than the last version2.11.1
so it's kind of not really valid. And so my head just exploded...Thanks a lot for any help!
The text was updated successfully, but these errors were encountered: