It’s OK to not use Yarn

David Gilbertson
Sep 3, 2017 · 4 min read

When I first read about Yarn, many moons ago, I thought hey, that’s neat. But I knew it wasn’t something I needed — like smart watches, or ‘friendship’.

As the months rolled by, I saw it showing up more and more in the install instructions for npm packages. Angular, Webpack, Prettier, Babel-loader, Bootstrap — all will inform you of the option to yarn add ...

I should be content to let the people be excited about the hot new thing. It’s really none of my business. And mind my own business I did, until I heard this: “we use Yarn because it’s more deterministic than npm”. I gasped, but luckily was able to cover my mouth in time so I don’t think they noticed.

For you see, that statement is not true. So, I thought it was about time for a blog post to counteract such misconceptions. Let’s start with a quote:

npm 5 has stronger guarantees across versions and has a stronger deterministic lockfile

That was the quote.

Who is this post for

Much like artichokes, this post is not for everyone. It’s for the developer using Node 8 (which comes with npm 5). The developer who has not read the Yarn and npm docs (you fools with your ‘social lives’). The developer who has heard about Yarn, seen it popping up in more and more places, and who has begun to think that they ‘should’ be using it.

Especially if you fit the above description and you didn’t know these things:

  • npm install works just fine offline*

* I spent more time than I’m willing to quantify trying to work out how to get my computer into “Airplane mode” when it’s on a wired connection. Then I realised I could just unplug the cable.

On the flipside, if you can articulate the problems you face with npm, and these are the same problems that Yarn was built to solve, then happy days for you.

Or if you don’t need any of the features, but feel that saving x seconds when you run npm install is worth a whole new tool, then that’s your choice — I don’t have an opinion either way about your terrible decision.

What this post is not

It’s absolutely not bashing Yarn. Yarn solves the problems it set out to solve and does it well. And the good people that make Yarn have done nothing to suggest that it does anything more.

In fact, do you remember that quote from 236 words ago — the one about npm being more deterministic — that’s from the Yarn site.

Is there something wrong with using Yarn?

Yes there is, if you don’t need it.

It didn’t take me long to find an example of someone using Yarn for no good reason:

Image for post
Image for post
From some tutorial

That’s like saying, “next step, change the channel on your TV. You can either use the remote that came with the TV, or rig up a long stick with a bit of wire and a rubber nob on the end so that you can use it even if your remote’s batteries go flat. It’s totally up to you; they do the same thing. I’m going to use the stick…”

Some words about JavaScript fatigue

I would like to propose a unit of measure for the construct of ‘JavaScript fatigue’: the YAT.

A YAT is Yet Another Thing that you have to think about when you should really be busy writing code.

A nice simple web site that just needs some HTML, CSS and maybe some JS — that’s maybe 2 or 3 YATs.

A few years back, if you wanted to start a React site, you’d want Node and npm, and React, Babel (with some plugins/presets), Flux, and Fluxible too, (it’s 2015). Webpack, a few loaders for JSX, ES6, SCSS, etc. Maybe eslint, Mocha and Chai and Sinon and Istanbul.

Before you could even get started you were looking at maybe 15 YATs of fatigue and a lot of half-reading documentation. And not just for you, for everyone working on the project, including those poor, poor newbies. Won’t somebody please think of the newbies?

Then Facebook dropped Create React App and we were back to the good old days of one or two YATs. One minute you’re watching the news when a thought pops into your head: “hey, I could make an online game that shows three Presidential tweets and the user has to guess which one is real”. 20 minutes later you’re at your computer with a prototype well under way.

I like this world we’re currently in. Minimum setup time, maximum productivity. Life is good.

But it won’t stay this way if we don’t fight for it. And that means questioning all complexity in the tools that we use, and that’s what this post is about.

Don’t use things you don’t need.

OK I’ve lost interest in this post and I really want to go and write that Trump Tweet game.

Stay tuned…

[the pitter patter of Cherry browns]


Image for post
Image for post

Go and play, try and get through all 20. If you’re anything like my focus groups you’ll be laughing at the start, bewildered in the middle, and sobbing by the end, wondering if maybe someone spilled beer on the matrix, and asking in a hollow tone if anyone is coming to clean it up.

Here’s the source, for those curious to see exactly how rubbish my code is.


Sign up for Get Better Tech Emails via


how hackers start their afternoons. the real shit is on Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

David Gilbertson

Written by

I like web stuff.

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

David Gilbertson

Written by

I like web stuff.

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store