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

前端 未结 30 2814
清歌不尽
清歌不尽 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条回答
  •  囚心锁ツ
    2020-11-22 08:17

    To see which packages have newer versions available, then use the following command:

    npm outdated
    

    to update just one dependency just use the following command:

    npm install yourPackage@latest --save
    

    For example:

    My package.json file has dependency:

    "@progress/kendo-angular-dateinputs": "^1.3.1",
    

    then I should write:

    npm install @progress/kendo-angular-dateinputs@latest --save
    

提交回复
热议问题