7 ms·
Really disappointed in NPM lately. These past few months have been downright silly. How many major problems like this affect other package managers?
by vorpalhex 8y ago
Really disappointed in NPM lately. These past few months have been downright silly. How many major problems like this affect other package managers?
- swyx 8y agowhat else in these "past few months" are you referring to? as a moderate npm user i am blissfully oblivious.
- losingthefight 8y agoNot OP but maybe he is referring to the big in which the npm upgrade bumped to a non-ready version and caused havoc on production systems by overwriting permissions and files: https://github.com/npm/npm/issues/19883 https://github.com/npm/npm/issues/19883 That was the end of February, so not sure but that may be it.
- jjeaff 8y agoThere was also the issue where npm filter bots accidentally expelled some large, legitimate users and then made the namespace available, thus allowing random people to take the packages over, and inject code into any applications that used those projects.
- erichurkman 8y agoThis is one of the scariest aspects to modern development. Thousands of applications are one bad actor away from ruin. We're incredibly vulnerable. Chrome extension gone rogue? Package repository allowed duplicate packages? A contributor's GitHub key was hijacked? Imagine uBlock Origin's Chrome extension author creds were hacked. "He" publishes a new version of the Chrome extension that monitors coinbase.com and fakes the transfer/confirmation screen, or submits transfers in the background. The extension has "write" access on all sites, so the rogue extension can also monitor your Gmail and silently inject a filter that routes trade confirmations to trash. Or the "requests" library in Python gets an update to replicate 2FA codes via Twilio to a 3rd party. Sure, you can do pinning and cryptographic signatures to verify that v 1.0.0 of X is really what you expected. But who audited 1.0.0 of X in the first place...?
- xab9 8y agoMy thoughts exactly. We are one step away from very bad shit hitting the fan in a very painful way... so let's pretend everything's fine and try not to think about these things.
- nkuttler 8y agoWhen a production system pulls "latest" of anything, such things are bound to happen. There probably is no reliable testing or QA either when deployment methods are not deterministic.
- da_chicken 8y agoWhenever I see NPM I think of the left-pad debacle and the more recent is-odd issue: https://www.reddit.com/r/programming/comments/886zji/why_has_there_been_nearly_3_million_installs_of/ https://www.reddit.com/r/programming/comments/886zji/why_has...
- throwaway66666 8y agoI have a (conspiracy) theory, that JS developers bribe and pay each other to include their projects as useless NPM dependencies, so they can rack up downloads and go to the next employer with a "My package has 2 million downloads, I want x% more than market rate" attitude. It's like the equivalent of influencer marketing, but for code packages. Of course I could just be a crazy old man. Who knows?
- consp 8y agoHaving just js experience on your resume would/should not effectively result in increased pay without substantial references. Even if you have a shitload of package downloads. Downloads do not represent good code, work attitude or otherwise interesting properties for a company, as you already pointed out by stating the 'fake' downloads for a lazy engineer with lack of respect for others (by forcing dependencies with dubious benefit).
- BigJono 8y agoI don't know if they bribe each other, but there's definitely a lot of people shilling garbage libraries because they have income streams dependent on it. Certain people here have alerts set up for certain topics so they can come in and astroturf. You'll be able to spot them if you keep a look out for it. They specifically target noob questions/discussions, post links to their blogs that talk about certain dependencies. The articles themselves have very little substance, they're full of buzzwords and spend all their words making ambiguous claims, for example they'll say that the dependency makes your code "scale", but won't give any examples from a large code-base, especially not any comparing to the alt case (without the dependency). They make claims about performance, but don't elaborate, don't show benchmarks (or the'll show benchmarks that don't apply to 99% of projects, kind of like how immutableJS is obviously not faster unless you're working with big data structures, which you almost never are in your standard CRUD app where everything is paginated server side). This shit is everywhere, and there's a lot of people with a vested interest in making sure these tools propagate as much as possible.
- jwalton 8y agoIn the past few weeks: * NPM 6 stopped working with Node 4. Rather than actually fix it, they just left it broken for several days because it was already fixed in the upcoming release, and I guess they didn't want to do an emergency release: https://github.com/npm/npm/issues/20716 https://github.com/npm/npm/issues/20716 * There was a several hour period where you could publish packages, but then they would 404 when you tried to download the new version. * They switched to using Cloudflare on Friday, and broke Yarn in the process: https://mobile.twitter.com/jamiebuilds/status/1000198463269699584 https://mobile.twitter.com/jamiebuilds/status/10001984632696... * Somehow while switching to Cloudflare they blew away a bunch of the packages that had been published during the previously mentioned window. They also blew away all the versions of some packages. Last Friday night you couldn't 'npm install gulp'. Never gave any explanation for this: https://github.com/npm/npm/issues/20766 https://github.com/npm/npm/issues/20766 About a month ago there was a bug where npm would change permissions on a bunch of system files and render you entire system unusable in you ran it as root. But that was OK because the bug was on the "next" version of npm, not the one you'd get by installing 'npm install -g npm'... Except there was also a bug in the current version of npm that installed the next version of any package by default, so it did in fact blow up a bunch of machines. Now, apparently, they are a teapot.
- tedivm 8y agoI don't think it's fair to blame them for breaking yarn. The way yarn setup their "mirror" url and the way Cloudflare handles account security conflicted and broke down yarn. I really don't see how any team could have seen that coming, or how they should be responsible for people making creative use of their infrastructure. Everything else is legit though.
- mort96 8y agoWell, they could have though, "Will this large infrastructure change affect any of the tools which depend on our infrastructure?", set up a small test system using cloudflare, and then test a few tools (like Yarn) against the new system.
- bartread 8y ago
- __s 8y agohttps://github.com/harthur/nomnom/issues/81 https://github.com/harthur/nomnom/issues/81 nomnom is no longer maintained, so npm takes the project over, & makes a 2.0.0 update which is empty besides a README saying it's deprecated. Which breaks some packages which have a '>=1.2' version. So npm deletes 2.0.0. Which breaks for people who have had their package.json update from 2.0.0. Even when they'd had a system working with 2.0.0 (not even using nomnom, just a depedency of a dependency for the commandline portion that isn't being used) & were ready to deploy In Rustland you can't publish a crate with '>=1.2' dependencies
- steveklabnik 8y agoI’m pretty sure you can, I thought we only outlaw *.
- dawnerd 8y agoLast couples weeks especially. Packages being published but not updated on the main registry. Super super frustrating.
- xab9 8y agoSince they introduced package locks `npm i` breaks way too often for us (we have win-mac-linux machines), it's a royal pain in the back.
- abritinthebay 8y agoYour packages break when installed from a lock file...?
- xab9 8y ago`npm i` breaks. Then we delete the lock file (and usually node_modules), run npm i again and it works. Probably it works for you and we are just unlucky or we were too lazy to use some cli magic, dunno. Yarn people here (at the company) usually say that yarn worked for them better, can't clarify about that. One time out of fun and curiosity we flushed the cache and deleted the lockfile and the node modules dir, did npm i on a mac and a windows and they were undiffably different. Okay, this was months ago and probably there is a good explanation for it, but it was not reassuring.
- abritinthebay 8y agoYarn breaks things all the time for me. Practically every build process issue I’ve had in the last 7 months has been Yarn related. Never had `npm i` break though... does it fail if you do `npm ci`? Are you pinning versions? Very peculiar behavior.
- xab9 8y agoDidn't try it, but I will, thanks.
- PaulRobinson 8y agoPackage management is hard. Ruby gems has had its issues and Go has got itself into a holy war just deciding how best to do dependency management. However over 2018 we seem to have got to a point where I’m worrying about some basic professional competencies and communication systems inside the npm project. I don’t know much about it, but looking at it from a sideways glance, you have to start worrying about what it is that they’re getting wrong, and how to derail their mistakes in my own team and workflows.
- pmlnr 8y ago> Package management is hard. and this is why writing yet another package manager instead of gradually improving existing ones - rpm, deb, etc. - is far from ideal.
- TheCoreh 8y agorpm and deb are tied to specific operating system distributions, and are also meant to install packages globally on a system. npm, on the other hand, is meant to be cross-platform and is primarily focused on installing dependencies on a per-project basis. Its rules for lookup, matching, deduplication etc are mostly defined or informed by Node.JS conventions. I don't think apt or rpm would be willing to cover these use cases, and even if they did, it would probably not be worth it
- LoSboccacc 8y agothe maven model has worked quite well so far.
- codefined 8y agoI'm not sure if it's a model thing or just that software has bugs, but lots of people really dislike Maven. Not sure it's an example of a good package manager.
- 8y ago
- techterrier 8y agoNPM is absolutely the worst package manager, apart from all the others I have tried.
- StavrosK 8y agoI'm pretty sure it's worse than most others I've tried.