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

前端 未结 30 2855
清歌不尽
清歌不尽 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:18

    I found another solution for recent version of NPM. What I want to do is to replace all the "*" dependencies with the explicit lastest version number. None of the methods discussed has worked for me.

    What I did:

    1. Replace all "*" with "^0.0.0"
    2. Run npm-check-updates -u

    Everything in package.json now is updated to the last version.

提交回复
热议问题