Member-only story
Hello Yarn 2, Goodbye Node_modules.
What’s new (and the least painful farewell in the history of JS)
Over three years ago, in 2017, Yarn 1.0 was officially announced in the Facebook Engineering Blog. Already by that time, only 11 months after its first release, more than 175,000 repositories had started using the new package manager.
Even though Yarn’s success story has continued steadily ever since, the tool has also fallen victim to many of the classic package handling weaknesses such as slowness, increased complexity, and data footprint.
Yarn 2 comes with a few fundamental changes which not only address these points but also improve your overall workflow.

What’s new in Yarn 2?
The new version had already been released last January (2020 that is), however, it took most bigger projects and libraries a good while to adjust to the new Plug’n’Play way.
And while some large names are still struggling to reach compatibility (as of the time of writing: Angular, React Native, and Flow), now is a good opportunity to try it out in your codebase.
Plug’n’Play support isn’t the only big change coming with Yarn 2 (the concept in itself isn’t even all that new and dates back to September 2018), the update actually ships a lot of great features which make life a lot more simple.
Yarn’s maintainers poured a full year of their time into these improvements and you can definitely feel that Yarn 2 is a well-thought-out product.
Actual debuggable CLI output
It starts with the CLI output which is now much more structured. While yarn console texts were previously a challenging visual wild west at best, formatting and colours now contribute to a much-improved readability.

On top of that, every line features its own error code and hence becomes a lot easier to…