npm过时不尊重package.json的插入符号 [英] npm outdated does not respect caret notation of package.json

查看:101
本文介绍了npm过时不尊重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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆