The wanted field makes no sense in the context of a --global run as there is no package.json to define which version you require.如果您希望生活在边缘,那么最新版本似乎是一个不错的选择.The latest version seems as a good choice if you like to live on the edge.通缉的专栏似乎是个错误,它在github 很多中报道了时间.The wanted column seems like a bug, it is reported in github many times.文档似乎有些误导,因此请澄清一下:The documentations seems a bit misleading so lets clarify:由于没有全局package.json,因此使用的版本约束为'*'(设置这里).As there is no global package.json, the version constrain used is '*' (set here).然后所需的版本是根据 semver 的软件包的最新版本.Then the wanted version is the latest version of the package according to semver.那是不对的,您得到的是 dist-tag 最新",通常与最新版本匹配版本(请参见此处).有些软件包使用这些标签来管理显示的内容(例如npm).Thats not true, what you get is the dist-tag "latest", that usually matches the latest version (see here). There are some packages that uses those tags to manage what get shown (like npm).似乎边缘想要. 这篇关于npm`想要`vs`最新`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 15:27
查看更多