Will & Skill Developers

Will & Skill Developers

Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Faisal M

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch




Installing Yarn on Ubuntu 16.04 LTS in 30 seconds

Faisal MFaisal M

Yarn is a new package manager for JavaScript that was built by a team at Facebook to address some pain points that many experienced with NPM.

Install it on Ubuntu

$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt-get update && sudo apt-get install yarn

And You are done!

What Yarn offers...

Ultra Fast.

Yarn caches every package it downloads so it never needs to download it again. It also parallelizes operations to maximize resource utilization so install times are faster than ever.

Mega Secure.

Yarn uses checksums to verify the integrity of every installed package before its code is executed.

Super Reliable.

Using a detailed, but concise, lockfile format, and a deterministic algorithm for installs, Yarn is able to guarantee that an install that worked on one system will work exactly the same way on any other system.

Yarn has a lot of neat features...

Offline Mode

If you've installed a package before, you can install it again without any internet connection.


The same dependencies will be installed the same exact way across every machine regardless of install order.

Network Performance

Yarn efficiently queues up requests and avoids request waterfalls in order to maximize network utilization.

Same Packages

Install any package from npm and keep your package workflow the same.

Network Resilience

A single request failing won't cause an install to fail. Requests are retried upon failure.

Flat Mode

Resolve mismatching versions of dependencies to a single version to avoid creating duplicates.

Read more at https://yarnpkg.com and https://code.facebook.com/posts/1840075619545360

Faisal M

Faisal M

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

View Comments