【问题标题】:npm outdated does not respect caret notation of package.jsonnpm outdated 不尊重 package.json 的插入符号
【发布时间】:2015-04-22 13:49:48
【问题描述】:

使用带有以下内容的 package.json 文件

"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) 的版本吗?使用this 作为参考。

我正在使用节点 v0.12.0 和 npm v2.5.1。

【问题讨论】:

    标签: javascript node.js npm package.json


    【解决方案1】:

    因为您当前安装了版本0.10.0,并且它符合您的版本要求。如果您有一个已经满足要求的版本,npm 不会查找最新版本。

    您可以执行npm update 将它们更新到可能的最新版本。

    【讨论】:

      猜你喜欢
      • 2018-01-28
      • 1970-01-01
      • 2012-06-28
      • 2019-06-26
      • 2018-03-20
      • 2022-08-05
      • 2018-09-13
      • 2021-11-15
      相关资源
      最近更新 更多