Yarn vs. npm 2018


#1

Curious which you are using and why - straight npm or yarn?

I had used yarn for a while, but switched back to npm as soon as they added package-lock.json. How about you?

In my experience, yarn always borked my bcrypt, and while it was a bit tricky to get bcrypt installed properly on Windows (I needed windows-build-tools installed), it runs flawlessly now.


#2

I tend to see-saw (don’t have a strong preference either way). I find that sometimes something doesn’t work on one, doing the exact same command on the other fixes things. Why that is, I have no idea. Probably something I should be looking deeper into but the quick fix of switching has always been too easy an option to take…

Couple of other points:

  • Big fan of NPM’s auto audit feature…
  • If I am looking for a library, the yarn site (Algolia powered) has a better search/discovery experience

#3

I briefly switched to Yarn in its early days, but switched back to npm when they implemented all the good things that Yarn had added like automatic package-lock files and better dependency resolution and flattening

The main reason I’ve heard for Yarn that i’ve heard recently is workspaces support. Which I don’t use so :man_shrugging: