Javascript - Yarn

> (World Wide) Web - (W3|WWW) > Javascript (Js|ECMAScript)

1 - About

Yarn is a package manager

It aims to resolve two problems:

  • to download the library only once by having a local repository
  • to fix the code of the dependency. Library authors may have change the code without changing the version and break your code. The immutability of installed packages is handled via a yarn.lock file, which ensures that every install results in the exact same file structure in the node_modules across all machines.

3 - Yarn command

Most yarn commands are similar to npm equivalents and it is fine to use the npm versions instead