Hacker News new | past | comments | ask | show | jobs | submit login

Its still not as fast as yarn FYI.



Yarn doesn't support all of npm's features. At least not as of a couple months ago when it 1) didn't support one of our needs at all, and 2) broke a couple NPM packages on install. This may or may not be part of why it's faster: it does less.


I think you have that backwards. npm doesn't support all of Yarn's features.


That may also be true, but so was what I wrote.


what are these npm's features that yarn doesn't support?


A look through their issues on Github will reveal quite a few "npm supports this feature, yarn doesn't, plz add" entries. There are even more "this works in npm but not yarn, and I'm not sure why", many of which are also effectively a result of features/cases that npm supports and yarn doesn't. I don't have an exhaustive list or anything, but it's right there to see if you're interested enough to dig for a minute or two. It's pretty clearly not a drop-in replacement for npm—at least not yet.

My experience a couple months ago was that almost anything slightly off the path of the most basic use case rapidly entered "here be dragons" territory, such that every problem became "are we doing something wrong, or is yarn broken again?", which wasn't worth any benefits it provided. If you're just installing packages from NPM, and those packages don't do anything even slightly weird, it's probably fine.

[EDIT] a running theme of the issues is that a lot of correctness-checking and edge-case handling is missing or incomplete, in addition to some "strange" npm features not being supported. Anyway, here are a couple examples of what I'm talking about:

https://github.com/yarnpkg/yarn/issues/3433

https://github.com/yarnpkg/yarn/issues/3507

https://github.com/yarnpkg/yarn/issues/2090

(last one has a lovely "why are you doing this?" as its first response, from the repo owner for bonus LULZ)

FAR from the only ones. IIRC one of our issues had something to do with Yarn totally rewriting the package.json of a package installed from a local directory, removing the "main" entry entirely, which broke it (obviously). Maybe it'll be something I use later, but right now I don't really want to have to wonder whether any given problem is due to some obscure breakage in my package manager when I can... just use npm and not worry about it.


I do support and these issues come up all the time with yarn:

- native packages are not well-supported by yarn yet, notably node-sass since it's so widely-used

- no private module support


I also had a weird issue where for certain packages yarn would pick up a version which was older than what npm would. Not sure if this had anything to do with the fact that we have an internal npm mirror (that being said, yarn claims it picks up the .npmrc information, so even if it did, that would be a yarn bug).

In addition, yarn seems to increasingly be prioritizing its own default configs over what may be saved in my ~/.npmrc. Had several proxy issues after upgrading to a newer version of yarn that I didn't have earlier.

The reason I switched to yarn wholesale was because my existing npm based infrastructure worked seamlessly (at least to the extent that I was using npm features). But I've noticed that newer versions of yarn seem to have regressed in terms of npmrc support, which is a huge problem.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: