Yarn is a node package manager for your code that is better than npm or bower. Yarn is created by Facebook in collaboration with Google, Exponent, and Tilde.
- Faster than npm. It is around 3 to 4 times faster than npm without any cache. It downloads the dependencies in parallel. It is much faster once it is cached. https://www.youtube.com/watch?v=yksxtxqORvY
- Deterministic. It will install the same consistent reproducable package dependencies and versions. npm depends on the install order and is non-deterministic (it may download a new minor or patch version) which could break your project.
- Works offline
- Supports other repos/formats
- Backward compatible to npm.
- Has Emojies 😎
https://yarnpkg.com/en/docs/install OR npm install -g yarn
yarn config set proxy http://username:password@yourproxyserver:8080/
yarn config set https-proxy http://username:password@yourproxyserver:8080/
Change Angular CLI to use yarn
ng set = --global packageManager=yarn
Migrating from npm. Run this in your project directory.
Chris Courses: Intro to Yarn
npm vs Yarn
Coding The Smart Way: Yarn Package Manager
Yarn vs npm
Yarn Package Manager: An Improvement over npm