![]() Before presenting a solution let's explain a bit why it works like this.Īs default when you install an npm package with yarn add the version of that package in package.json is prepended with a caret, like ^7.2.0. This is usually not a big problem because you have a file called yarn.lock in your root directory that keeps track of all your installed versions but if you are a perfectionist like me, you also want the package.json file to reflect what versions used in the project. Something that those coming from using npm update finds out is that the yarn equivalent doesn't update the package.json with the new versions. It updates all packages to their latest backwards-compatible version. ![]() Updating dependencies in an npm project is pretty straight forward and easy to do with the command yarn upgrade.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |