Live data from Hacker News

Many packages suddenly disappeared

github.com

81–90 of 520 posts

Re: Many packages suddenly disappeared

#81
post #61

Hmm, I Java world we pretty much always used a local (company-owned) Maven proxy server, which grabbed packages from public repos and cached them locally to make sure builds still work if public servers were down or slow... or packages disappeared. This isn't a standard practice in JS world?

It is at big orgs, but not small shops.

Re: Many packages suddenly disappeared

#82
post #61

Hmm, I Java world we pretty much always used a local (company-owned) Maven proxy server, which grabbed packages from public repos and cached them locally to make sure builds still work if public servers were down or slow... or packages disappeared. This isn't a standard practice in JS world?

I’ve worked at places where the Java devs used Maven Central directly. I’ve also worked at a place where the Node devs use an on-premises copy of dependencies for builds and deploys.

It might not be as standard a practice in the Java world as you think.

Re: Many packages suddenly disappeared

#83
post #61

Hmm, I Java world we pretty much always used a local (company-owned) Maven proxy server, which grabbed packages from public repos and cached them locally to make sure builds still work if public servers were down or slow... or packages disappeared. This isn't a standard practice in JS world?

Yes, for those who use `yarn`. (Yarn's package caching looks a lot like Mavens)

Re: Many packages suddenly disappeared

#84
post #52
post #44

Btw. for those who don't know: Yarn (which is an alternative to npm) uses a global cache [1] on your machine which speeds things up, but probably also protects you from immediate problems in cases like the one currently on progress (because you would probably have a local copy of e.g. require-from-string available). [1] https://yarnpkg.com/lang/en/docs/cli/cache/

Already counting down the days before yarn is considered old and broken and people are recommending switching to the next hot package manager/bundler...

It badfles me that technologists commonly complain about new technology. As far as I can tell your complaint boils down to “people should stop making and switching to new things”.. I find it hard to understand why someone with this attitude would be a technologist of any kind, and I find the attitude really obnoxious.

Re: Many packages suddenly disappeared

#86
post #71

In my org, we use Artifactory as a cache between us and external sources. They have a free version too. I'd encourage everyone to use it, or something like it. Stop pointing your package managers to the public registry.

What gives you more confidence in them? Just a better track record, or is it a fundamentally more reliable model?

Re: Many packages suddenly disappeared

#87
post #44

Btw. for those who don't know: Yarn (which is an alternative to npm) uses a global cache [1] on your machine which speeds things up, but probably also protects you from immediate problems in cases like the one currently on progress (because you would probably have a local copy of e.g. require-from-string available). [1] https://yarnpkg.com/lang/en/docs/cli/cache/

It's useless in cases like this though, where the package is already invalidated in the yarn cache, which is the case right now for many packages.

Re: Many packages suddenly disappeared

#88

I never understood the love for package managers that directly hook and import things into your codebase or repo or even worse servers. I guess the benefit is that "it just works", but the fact that you do not know where a package is coming from can't be worrying just me. In my company we take the stable version of the library we want to use and we self-host it. We basically have added a cache that we manage and cont…

Just today, someone posted an article about how malware can be distributed via npm:

"Harvesting credit card numbers and passwords from websites"

https://news.ycombinator.com/item?id=16084575

If you self-host a stable version, you'll have some time to hear about potential problems in a new version before updating it.

Re: Many packages suddenly disappeared

#89

Yikes, what is it about node/npm/javascript that makes it feel like a house of cards?

As a counterpoint, couldn't any sufficiently complex structure be called a hack and a house of cards, when you really dig down into how it's put together? Mm, maybe not any - as some complex systems are well-tested with solid architecture - but just some, or most..

Re: Many packages suddenly disappeared

#90
post #66

Earlier quoted context omitted.

> Gah. Moments like these always gives me a bit of panic, since I realize that so much of my software relies on external sources. Install an instance of Sonatype Nexus, create a proxy-repo for npm (and Maven if you also use Java) and that's it. What, however, won't be caught is Docker (because that crap insists on directly talking to the Dockerhub servers, which is a giant security hole waiting to happen) and PHP com…

Or just don't .gitignore node_modules, then diff any changes to node_modules on update.

This was the officially recommended solution for long, but suffers from a few issues. Most notably for me is that pull requests that change any dependencies become impossible to read (on github at least).
Post reply on HN