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*

works just fine offline* npm install some-package updates package.json by default without appending --save

updates by default without appending npm install some-package creates/updates package-lock.json by default

* 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.