As an Ember developer, discovering Yarn package manager by Facebook was the best that could happen to me.
Whenever one of my fellow developers encountered “Broccoli Plugin failed…” I used to say ‘rm -rf node_modules’, that’s what my seniors told me and I continued the tradition.
That was very frustrating and as a beginner, I use to blame it all on Ember as I didn’t understand much of what was happening. As time passed I realized npm was the culprit. But a few months back I discovered this Yarn package manager. When I found it, I read that it promised to solve most frequent ‘npm install’ errors. It claimed it was better because it was:
· Deterministic, unlike npm.
· Network performance by parallel installations.
· Same package installation like npm (it uses the same registry).
· Yarn uses check-sums to verify the integrity of packages.
· Works even Offline for previously installed packages as it caches all the packages.
It has gained a lot traction in recent times so its features can be found all over the internet. What you won’t find that easily on the internet is how does it achieve these great features. I initially didn’t pay much attention to how did npm installations work but as I got to learn about the yarn I got curious, so I decided to dive deep and find how did they work. Hope it helps beginners understand things better.
Subscribe to Engineering At Kiprosh
Get the latest posts delivered right to your inbox