Live data from Hacker News

Show HN: Node.js node_modules file pruning

github.com

51–60 of 66 posts

Re: Show HN: Node.js node_modules file pruning

#51

Earlier quoted context omitted.

Man it's free code, you're reading into this far too much.

I'm trying really hard to see what price has to do with anything I've said.

Well, that's your problem right there.

This line particularly reveals your very sad flavor of entitlement:

> hey i did this at 2am out of frustration, i chose the tools that i knew best, use it at your own risk, opensourced to share knowledge and to access it from my own projects, not as a "productified" software.

Re: Show HN: Node.js node_modules file pruning

#54
post #30
post #18

Earlier quoted context omitted.

Many authors are strangely against it for some reason. One time I sorted my node_modules by size and opened issues for the top offenders, you can see their resistance here: https://github.com/crypto-browserify/sha.js/issues/5 https://github.com/medikoo/es5-ext/issues/11

Speaking as very-much-not-a-JS-developer: Isn't this essentially the same problem Linux package managers solve with -dev, -doc, and -dbg packages? I.e. the default install only contains the minimum necessary to use a program, and if you need the header files/documentation/debug symbols, you can just install them separately. Is it too hard to meaningfully separate these parts of a package, or is it more of a philosoph…

It really is not too hard to separate these things in npm, but very few packages do.

Re: Show HN: Node.js node_modules file pruning

#58
Symptomatic of the npm community’s overloading of “npm install” to serve both users and contributors. It’s easy to configure “npm publish” to do essentially this for all users, but it’s considered bad practice. Which I don’t understand, since the dev use case is still fulfilled - and better - by “git clone”. And merging the two doesn’t scale - Chrome’s dev download is several GB and takes hours to build.

Re: Show HN: Node.js node_modules file pruning

#59

Shouldn't this be handled entirely by npm? If these files are unnecessary why do they get downloaded in the first place?

See my top-level comment. It should be handled by library authors, and npm does provide the tooling to do it, but most authors choose to include the files. Seems to be a difference of principle.
Post reply on HN