npm outdated does not respect caret notation of package.json

烈酒焚心 提交于 2019-12-24 16:13:49

问题


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"
}

I get an npm outdated output that looks like

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.

I'm using node v0.12.0 and npm v2.5.1.


回答1:


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.

You can execute npm update to update them to the latest version possible.



来源:https://stackoverflow.com/questions/28636506/npm-outdated-does-not-respect-caret-notation-of-package-json

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!