Yarn

Arun Rajeevan
1 min readOct 20, 2018

--

Facebook released their own package manager solution, called Yarn.
Fast, reliable and secure dependency management — this is the promise of Yarn, the new dependency manager.
Installing Yarn

There are several ways of installing Yarn. If you have npm installed, you can just install Yarn with npm: npm install yarn --global

Offline cache

When you install a package using Yarn (using yarn add packagename), it places the package on your disk. During the next install, this package will be used instead of sending an HTTP request to get the tarball from the registry.
Your cached module will be put into ~/.yarn-cache, and will be prefixed with the registry name, and postfixed with the modules version.

Example:if you install the 4.4.5 version of express with Yarn, it will be put into ~/.yarn-cache/npm-express-4.4.5.

Deterministic Installs

Yarn uses lockfiles (yarn.lock) and a deterministic install algorithm

License checks

Yarn comes with a handy license checker, which can become really powerful in case you have to check the licenses of all the modules you depend on.

--

--

No responses yet