loading table of contents...

Frontend Developer Manual / Version 2107

Table Of Contents

5.15 Changing the Yarn Registry

Sometimes it might be necessary to adjust from which source yarn will download its packages (for example if you want to use a mirror or the original registry cannot be reached from your location).

In general this can be achieved by changing the yarn configuration, for example by using the following shell command:

yarn config set registry

But as a yarn.lock is used to fixate our used dependencies this will no longer have an effect on all packages. The yarn.lock will not only fixate the used dependency version but also the location from which the packages are downloaded. This means that the configuration will only have an impact on newly added packages after the yarn.lock has been generated.

As yarn has not yet addressed this issue our suggestion is to set this configuration as described above and in addition to this customize the yarn.lock by replacing all occurrences of the registry with your custom configuration.



Although removing the yarn.lock would cause the configuration to be taken into account again and yarn will generate a new yarn.lock using yarn install the fixated dependency versions will be lost and replaced with the most recent versions. This is not suggested as it leads to an inconsistent behavior across different builds and there is no guarantee that the workspace will build with dependency versions that are different from the versions that have been fixated in our original yarn.lock.

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.