Yarn- A new package manager for JavaScript

Yarn- A new package manager for JavaScript

Yarn- A new package manager for JavaScript

Yarn Package managers are incredibly popular tools, especially in the front end JavaScript communities. They make it easier for developers to install, update, configure and uninstall code modules within their applications. They do so by communicating with a registry of code modules and manage the various dependencies code modules usually have.

The most popular JavaScript package managers are NPM and Bower. Earlier they provide access to more than 300,000 packages in the npm registry. More than 5 million engineers use the npm registry, which sees up to 5 billion downloads every month. However, a new package manager has been developed by Facebook, in collaboration with Exponent, Google, and Tilde.

Yarn aims to address issues Facebook have experienced with NPM, particularly in areas such as performance, security, and consistency. This new package manager still has access to the NPM and Bower registries.

For example, when using NPM, depending on the order in which modules are installed, developers might end up with two different versions of a particular module in their local development environment. This can cause issues where everything works fine on one developer’s machine but not on another’s. To address this issue, Yarn uses lockfiles to tie modules to a specific version of a project, thus assuring that the same version is installed on all developers machines.

Yarn has additional features to further simplify the dependency management workflow.


  1. Compatibility with both the npm and bower workflows and supports mixing registries.
  2. Ability to restrict licenses of installed modules and a means for outputting license information.
  3. Exposes a stable public JS API with logging abstracted for consumption via build tools.
  4. Readable, minimal, pretty CLI output.   

Comments