News for hackers. Stuff that matters.
Re:Yarn's Future – v2 and beyond by misiti3780 on Thursday January 24, 2019 @11:55AM (#18990400)
serious question, if you are starting a new project today why would you choose to use npm over yarn?
Re:Yarn's Future – v2 and beyond by asnrk on Thursday January 24, 2019 @01:51PM (#18991681)
Experience at the agency I worked at until a couple months ago, which had continually followed this pattern with projects started after the yarn/npm split got serious:

1) Start or inherit a project using Yarn because that's what all the cool kids are using.

2) Develop for a while, everything's fine.

3) Lose a whole day when you eventually stumble on a Yarn bug or missing feature in Yarn.

4) Angrily switch the project to NPM, solving the problem immediately.

5) Continue developing as usual.

I think this happened on like half a dozen projects after the yarn/npm split occurred, and I saw it happen as recently as Fall 2018. Developers leaned trend-chasing there, but after being burned several times even the trend-chasier ones were tepid on yarn and tended to accept that if they started with it they'd probably end up switching before long.

FWIW I don't like npm much, but I still default to it so I don't, inevitably, hit the above situation at some point. Yarn doesn't provide enough benefits to make it worth having an even less-trustworthy tool in my build process than npm already is.

[EDIT] TL;DR: We all got sick of ending up on open GH issues for Yarn when trying to track down build and, worse still, run-time problems. So we started favoring NPM again as the lower (though far from zero) headache option.

Re:Yarn's Future – v2 and beyond by ariabuckles on Thursday January 24, 2019 @01:48PM (#18991653)
Because it comes standard with most node distributions and is pretty good.

It coming standard means one fewer dependency for everyone on the team to install, which is important on my current team where roughly half are backend- or mobile-only.

I like both yarn and npm, and yarn would have some benefits for us, but probably not enough to counter the extra effort onboarding other devs. npm still has some pain points, but I’ve ran into a few pain points on yarn too. And I think there being multiple projects here has helped the ecosystem.

npm is also doing some neat feature development (npm audit).

Also, the npm team is fantastic, whereas when I adopted yarn early on they dismissed the issue I opened about yarn not working for my setup. They’re a good team, but that lowered my confidence that I’d be able to get through any obstacles while using it. It’s still a fantastic tool though.)

Re:Yarn's Future – v2 and beyond by azangru on Thursday January 24, 2019 @12:50PM (#18991013)
Because npm is a standard (default) package management tool that comes with node.

After getting `package-lock.json` and `npm ci`, I would rather wonder why choose yarn instead of npm.

Re:Yarn's Future – v2 and beyond by MehdiHK on Thursday January 24, 2019 @01:16PM (#18991281)
"npm ci" deletes node_modules directory every time. Try using that when you depend on some native modules. :(
Re:Yarn's Future – v2 and beyond by azangru on Thursday January 24, 2019 @03:31PM (#18992611)
I thought `npm ci` is more suited for ci machines, where it's crucial that packages are pinned to specific versions. For local development, I just npm install. Perhaps with no-save option in order to avoid updating package-lock. Works fine.
Re:Yarn's Future – v2 and beyond by eknkc on Thursday January 24, 2019 @02:36PM (#18992114)
Because I don’t trust it. Had to do rm -rf node_modules too many times with npm.