Needs advice
on
YarnYarn
vs
npmnpm

From a StackShare Community member: 鈥淚鈥檓 a freelance web developer (I mostly use Node.js) and for future projects I鈥檓 debating between npm or Yarn as my default package manager. I鈥檓 a minimalist so I hate installing software if I don鈥檛 need to- in this case that would be Yarn. For those who made the switch from npm to Yarn, what benefits have you noticed? For those who stuck with npm, are you happy you with it?"

READ LESS
5 upvotes4.8K views
Replies (13)
Avatar of marknelissen
CTO at Gemsotec bvba
Recommends
npmnpm
vs
npmnpm
vs

I use npm because I also mainly use React and TypeScript. Since several typings (from DefinitelyTyped) depend on the React typings, Yarn tends to mess up which leads to duplicate libraries present (different versions of the same type definition), which hinders the Typescript compiler. Npm always resolves to a single version per transitive dependency. At least that's my experience with both.

READ MORE
4 upvotes2.9K views
Avatar of juliancruzsanchez
Lead Developer at Chore Champion
Recommends
YarnYarn
at

We use Yarn because it allows us to more simply manage our node_modules. It also simplifies commands and increases speed when installing modules. Our teams module download time was cut in half after switching from NPM to Yarn. We now require all employees to use Yarn (to prevent errors with package-lock.json and yarn.lock).

READ MORE
6 upvotes3K views
View all (13)
Avatar of Mark Nelissen

Mark Nelissen

CTO at Gemsotec bvba