Search code examples
yarnpkg

How to upgrade several packages to specific version?


I use yarn
I have an @angular application with lib modules in several repos.
I want to upgrade all @angular dependencies from one module to the version from another one. NOT to the latest Bugfix

desired version: 11.2.7
latest: 11.2.13

How can I do that?

with

yarn upgrade --scope @angular

they get upgraded to 11.2.13


Solution

  • yarn add package-name this will install the "latest" version of the package.

    yarn add package-name@1.2.3 this will install a specific version of a package from the registry.

    yarn add package-name@tag this will install a specific "tag" (e.g. beta, next, or latest).

    You should use yarn add angular@11.2.7