7 ms·
To Yarn and Back to Npm Again
- jakoblorz 8y agoThat's why we love the JavaScript ecosystem so much: you have always got something to do!
- himom 8y agoShhhh... mutually-reinforced job security from unnecessary development churn and endless novelty.
- matte_black 8y agoI wonder when people will catch on.
- hitekker 8y agoExactly. I once brought up what you said to an acquaintance and, wow, the way the color drained from his face, the way his voice hardened and lowered in tone, as he said "That's just a bunch of bullshit.". Later that month, he would go to work for IBM as a junior-level front-end engineer. As always, it's probably better to be quiet and let the insecure live in their own little worlds.
- ricardobeat 8y agoI wonder if they ever tried `yarn --pure-lockfile` to avoid updating the lockfile unnecessarily? > We never observed install inconsistencies when using npm previously Interesting, since NPM has had issues being deterministic since package-lock came to be, and this was one of the main reasons yarn was created. The fact that yarn has a healthy community, actually accepts contributions, and encourages public discussion is a big pro for me (colored by personal experience).
- reitanqild 8y agoA small detail from the error outputs that might tell a lot: NPM error: ~probably not our fault, there might be additional output above Yarn error: ~an error has occured, here's what you'd do if you think it is a bug NPM is probably correct most of the time but the difference in attitude felt striking to me.
- bcheung 8y agoI'm not sure I like the new npm. It seems faster but it's annoying to use it with how often it prompts you to update it and all the verbosity, annoying messages about peer dependencies, and now audits that you can't really do anything about. There's just so much noise now. Old version just worked and got out the way.
- deleted 8y ago[deleted]
- kenning 8y ago> Old version just worked and got out the way. Just when I thought I had heard every opinion on npm, I find someone with the opinion "It always worked fine."
- elvin_d 8y agoYarn also has a useful feature `workspaces`. With npm have to use lerna for it
- Untit1ed 8y agoThis is a massive deal for monorepos. A lerna bootstrap with yarn as the package manager takes a few minutes from scratch, with npm it takes hours.
- simplify 8y agonpm 6 still has weird caching bugs from previous versions when working with git dependencies. I'll be sticking with yarn until that gets fixed.
- manigandham 8y ago> Yarn often produces yarn.lock files that are invalid when you run add, remove, or update. This has never happened to us with heavy daily usage. It's one of the things that remains reliable about Yarn. Would appreciate more details on what exactly happened.
- himom 8y agoOur experience has been yarn is fast and reliable.
- repsilat 8y agoHmm, `yarn add` reliably takes a few years in my environment (WSL). Maybe the environment is the problem, though.
- manigandham 8y agoThe windows subsystem for linux? It's dealing with lots of tiny files going through a virtualization layer, you might want to just use the Windows native version of Yarn which is very fast.
- jaxn 8y agoNTFS may not handle a bunch of small files well, but I'm pretty sure WSL isn't a virtuialization layer.
- steve_adams_86 8y agoYou're right (I didn't realize this): https://docs.microsoft.com/en-us/windows/wsl/faq#why-would-i-use-wsl-rather-than-linux-in-a-vm https://docs.microsoft.com/en-us/windows/wsl/faq#why-would-i...
- jaxn 8y agoIt's pretty neat (I use it every day). It closes the gap on OSX for "*nix experience on a computer that can run Photoshop and Excel"
- lsalvatore 8y agoWe're using a boilerplate project from a year ago with Yarn/React and it's still behaving the same way. Of course we have some deprecation warnings, but is it really so bad to have this "If it's not broke, don't fix it" mentality?
- snerbles 8y agoThat doesn't gain you as many stars on GitHub, conference talks, TechCrunch articles and HN threads.
- airstrike 8y agoaka the social media for everyone who likes to hate on mainstream social media
- draw_down 8y agoThose warnings turn to errors of course. That’s what they’re warning you about.
- rhacker 8y agoI love npm, but there's some bug that keeps looming. I have a git based dependency (basically a dependency that's attached to https://user:password@gitlab.com/xxxxxx#branch https://user:password@gitlab.com/xxxxxx#branch) I don't know why, but any time I install something specific in this project: npm i -D @types/tacos (for example) The last line of npm says this: added 9 packages and removed 15 packages in 9.69s Those 15 removed packages? Not dependency conflicts, no, thats the git dependency and all of its sub-dependencies. So my workflow is now: npm i --save <whatever> npm i
- masterj 8y agonpm fixed a lot of the git dependency issues with 5.7.1. Have you tried updating?
- zerace 8y agoI had this issue as well. I found an outstanding issue [0] on github. Running npm install -g npm will update your npm to the absolute latest version, which resolves this erroneous removal. [0] : https://github.com/npm/npm/issues/17379 https://github.com/npm/npm/issues/17379
- greysteil 8y agoI worked with @iarna over at npm to get a very similar bug fixed - https://github.com/npm/npm/pull/20198 https://github.com/npm/npm/pull/20198. I'm pretty sure this is just a special case of that bug - if you're not on npm 6.1.0 it might be fixed there. Otherwise I'd encourage you to comment in on that PR / the attached issue with a flow to reproduce.
- WorldMaker 8y agoExcellent news. Is this fix likely to fix prune by chance as well? (That's been bloating my Electron packages for a bit in that I haven't been able to trust prune --dev not to prune dependencies of a git package.)
- deleted 8y ago[deleted]
- msoad 8y agoJust the way npm handled my bug reports made me decide never use npm cli again. The registry is something everyone has to use because npm has a monopoly. It's not open source and is making money for a for profit company. I'm very disappointed to see Node.js is still shipping this anti-foss OSS with its executables :(
- reitanqild 8y agoTry running a repo for free : ) As you might infer from my comments I'm not the biggest fanboy but criticising them over running a freely available repo that the community has used for years feels a little bit wrong
- msoad 8y agonpm CLI is run by Npm Inc. Npm makes money by maintaining the CLI as their primary selling point. for profit. Yarn is also have many paid engineers from Facebook and Google contributing to it as their day job. These things are not real free open source software by any means
- reitanqild 8y agoFree open source does not mean "not for profit". This is actually an important thing. Huge parts of the largest open source projects comes from "paid engineers from Facebook and Google contributing to it as their day job" or even from IBM, Microsoft or Oracle employees. What matters is that it is released as open source so we can maintain it or pay someone else to do it. The special thing about npm is they also run the package repo but even there I'd say they played nicely by allowing free use and not discouraging alternative clients.
- h1d 8y agoWhat exactly is your problem with npm and npm.inc and what is your suggestion to fix it?
- ironarm 8y agoI've been enjoying pnpm as my node package manager for about a year now. <https://github.com/pnpm/pnpm> https://github.com/pnpm/pnpm> It centrally downloads all of the modules and then "symlinks" them into your `node_modules` folder. This is nice because one, it uses less disk space, two, if you've already downloaded a package at a particular version it links it out of the local repo. Also uses shrinkwrap to handle package locking.
- finchisko 8y agoYes, pnpm is awesome. Only occasional issue was for me, that it didn't installed peerDependencies by default. Also not sure if it's gonna work in environments like react-native (never tested).
- pitaj 8y agoNeither do yarn or npm AFAIK
- foob 8y agoI agree, pnpm is excellent. The node_modules directory can easily take up hundreds of megabytes, and the storage space savings that pnpm provides are really convenient when you write a lot of small projects with similar sets of dependencies. I did a comprehensive benchmarking comparison on npm, pnpm, and yarn a while back, and pnpm was the clear winner for my needs [1]. Those benchmarks are admittedly outdated now because, as this submission points out, npm 6 introduced significant improvements over npm 5. Despite that, pnpm is still an underappreciated contender in the space. - [1] https://github.com/pnpm/pnpm https://github.com/pnpm/pnpm - [2] https://intoli.com/blog/node-package-manager-benchmarks/ https://intoli.com/blog/node-package-manager-benchmarks/
- jessaustin 8y agoI always wondered why npm didn't use symlinks more... (at all?)
- remyrylan 8y agoBeen using pnpm for about 3 months solid now and I'm a huge fan. Most packages rely on node's built-in resolve system and have no problem with pnpm's symlinks. For packages like Jest and Webpack that have some custom resolve logic, I just use the `--shamefully-flatten=true` option and everything is perfect. Saved me over 6GB on my file system across several projects. Big thumbs up from me.
- spraak 8y ago> We've published an open-source module called deyarn to help you convert your projects from Yarn to npm! Would have been cool to call it "untie" or "untangle"
- reitanqild 8y agoI've used synp. It works both ways
- baxuz 8y agoThe reason I can't stand npm is that a lot of their employees are extremely vocal massive cunts.
- baxuz 8y agoIn any other tech company, the employee would get booted asap for sharing toxic, hateful stuff.
- nailer 8y agoStill getting data loss with npm 5 and 6: https://github.com/npm/npm/issues/17927#issuecomment-393033638 https://github.com/npm/npm/issues/17927#issuecomment-3930336...
- warmuuh 8y agocan somebody tell me why the thumbnail of this page shows report data with probably private email data? (see og:image meta tag on that page)
- afraca 8y agoThis sounded interesting, but turns out it's just the screenshot from their homepage [0] [0] https://mixmax.com/ https://mixmax.com/
- T3RMINATED 8y agoyarn is still better than npm. You are making a grave mistake.