简体   繁体   English

将package.json中的每个依赖项更新到最新版本?

[英]update each dependency in package.json to the latest version?

The best way I know of now is to run npm info express version then update package.json manually for each one. 我现在所知道的最好方法是运行npm info express版本,然后为每个版本手动更新package.json。 There must be a better way. 一定会有更好的办法。

{
  "name": "myproject",
  "description": "my node project",
  "version": "1.0.0",
  "engines": {
    "node": "0.8.4",
    "npm": "1.1.65"
  },
  "private": true,
  "dependencies": {
    "express": "~3.0.3", // how do I get these bumped to latest?
    "mongodb": "~1.2.5",
    "underscore": "~1.4.2",
    "rjs": "~2.9.0",
    "jade": "~0.27.2",
    "async": "~0.1.22"
  }

} }

尝试修改package.json中的版本以使用*代替版本号,然后进行npm install,这应该可以解决问题:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM