Needs advice
on
npmnpm
and
YarnYarn

From a StackShare Community member: “I’m a freelance web developer (I mostly use Node.js) and for future projects I’m debating between npm or Yarn as my default package manager. I’m a minimalist so I hate installing software if I don’t 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
7 upvotes·265.4K views
Replies (14)
CTO at Gemsotec bvba·
Recommends
on
npm
npm

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
5 upvotes·229.4K views
Lead Developer at Chore Champion·

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
11 upvotes·1 comment·240.9K views
Damian Esteban
Damian Esteban
·
February 15th 2020 at 1:04AM

We recently made the switch to Yarn mostly because of workspaces, speed, and the features in the Yarn v2 release. It has been great.

·
Reply
View all (14)
Avatar of Mark Nelissen

Mark Nelissen

CTO at Gemsotec bvba