Npm v5.1.0 Released
github.com
github.com
I used npm a lot and had sporatic unexplainable errors. I haven't used npm 5 to say if it's been fixed, but that turned me off.
A problem with yarn was, that it has trouble upgrading all dependencies: https://github.com/yarnpkg/yarn/issues/3492
yarn has been a breeze to use so far, I'm loving the quick installs. Only nitpick is that I have to be inside of the working directory of the package.json when adding a new package, because yarn for some reason does not travel up the hierarchy and installs it in the same directory as the first encountered package.json, like npm does.
And if you are wondering: Why a lockfile? It has also been a game changer, everyone in my team has the same dependencies installs, dependencies do not suddenly break. (Anecdote: Before the switch some dependency of an dependency of an dependency overwrote some Array function, and broke our whole product. I was on vacation and had to fix this remotely, because it was kind of hard to debug).
The only obstacles we ran into: 1) private registries did not work, but this has been fixed 2) yarn upgrade command behavior is sometimes funny, but this is going to be fixed soon:
- https://github.com/yarnpkg/yarn/issues/3603
- https://github.com/yarnpkg/rfcs/blob/master/text/0000-upgrad...
2. Deterministic installs (running install with the same lockfile will result in the exact same node_modules). With npm, we ran into issues that would somehow be fixed after deleting the node_modules directory and reinstalling everything. That worked far too often.
3. The offline mirror. This gave us a reasonable method for checking in our packages to our Git repo, meaning we could build our site without an internet connection.
It basically fixed all of our issues with npm, saving us hours upon hours of time.