npm过时不尊重package.json的插入符号 [英] npm outdated does not respect caret notation of package.json
问题描述
使用带有以下内容的 package.json 文件
Using a package.json file with the following
"devDependencies": {
"grunt": "^0.4.5",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-dev-update": "^1.1.0",
"grunt-jasmine-node-new": "^0.3.2",
"grunt-node-inspector": "^0.1.5",
"grunt-nodemon": "^0.4.0",
"grunt-npm-install": "^0.1.0"
}
我得到的npm outdated
输出看起来像
为什么想要不是0.11.0? "grunt-contrib-jshint": "^0.10.0"
是不是意味着任何大于或等于0.10.0但小于1.0.0(>= 0.10.0 && < 1.0.0
)的版本?使用此作为参考.
Why is Wanted not 0.11.0? Doesn't "grunt-contrib-jshint": "^0.10.0"
mean any version greater than or equal to 0.10.0 but less than 1.0.0 (>= 0.10.0 && < 1.0.0
)? Using this as reference.
我正在使用节点v0.12.0和npm v2.5.1.
I'm using node v0.12.0 and npm v2.5.1.
推荐答案
因为您当前已安装版本0.10.0
,并且它符合您的版本要求.如果您已经满足要求,则npm
不会寻找最新版本.
Because you currently have installed version 0.10.0
and it matches your version requirements. npm
doesn't look for the newest versions if you have one that already fulfills the requirements.
您可以执行npm update
将其更新为可能的最新版本.
You can execute npm update
to update them to the latest version possible.
这篇关于npm过时不尊重package.json的插入符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!