How to update each dependency in package.json to the latest version?

前端 未结 30 3474
清歌不尽
清歌不尽 2020-11-22 08:01

I copied package.json from another project and now want to bump all of the dependencies to their latest versions since this is a fresh project and I don\'t mind

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 08:24

    The only caveat I have found with the best answer above is that it updates the modules to the latest version. This means it could update to an unstable alpha build.

    I would use that npm-check-updates utility. My group used this tool and it worked effectively by installing the stable updates.

    As Etienne stated above: install and run with this:

    $ npm install -g npm-check-updates
    $ npm-check-updates -u
    $ npm install 
    

提交回复
热议问题