Yarn Fun
Use Cases and Deployment Scope
We have a lot of NodeJS projects in the company I work for. This includes our customer database, which contains millions of records. Many of those projects also have a microservice architecture. In order to keep our code tidy and manageable, we segment it into logical NodeJS modules and use Yarn to install those modules and manage their versions. This is very important to us, as we need to reuse as much code as we can in different microservices (for authentication, calling other APIs, security ...)
Pros
- Package management
- Speed of download compared to npm
- Moduel version control
Cons
- Rarely, some server connection error appear, while npm works alright.
- Sometimes, deleting the whole vendor directory is the best solution to solve weird issues.
- You still might need npm to install Yarn.
Likelihood to Recommend
There is really no real reason why not to use Yarn today. It's much faster than NPM, and you will need a dependency management system anyway. The only thing that might be missing is the fact that it doesn't come natively with NodeJS, and you have to install it yourself. I'd like to see the NodeJS ecosystem include Yarn by default.
