3 ms·
I've run in to so many npm errors over the past couple weeks, some due to npm bugs, some due to buggy packages, that I'm not very confident in npm or the packag
by tlrobinson 11y ago
I've run in to so many npm errors over the past couple weeks, some due to npm bugs, some due to buggy packages, that I'm not very confident in npm or the package ecosystem any more.
First of all, most people don't actually follow semantic versioning, but npm's default version ranges assume they do, so unless you lock down your dependencies with `npm shrinkwrap` you'll find your app occasionally breaks because some deeply nested dependency broke something in some package you don't know anything about.
But shrinkwrap has a bunch of problems itself (so many that Uber wrote a separate tool to try to fix it: https://github.com/uber/npm-shrinkwrap https://github.com/uber/npm-shrinkwrap). npm-shrinkwrap.json files are huge, in part due to the nature of npm, but it also contains a bunch of unnecessary information. The bigger problem is it's non-deterministic, resulting in huge diffs every time you run it, even if nothing has changed.
Here's another fun bug I encountered recently: https://github.com/npm/npm/issues/9642 https://github.com/npm/npm/issues/9642
Every time I think I've worked around some bug another pops up. I wish I've kept track of them all.
/rant
- Klathmon 11y agoCan't you just check dependencies into your source control if you really need consistency at that level?