4 ms·
This (or something like it) is always the top thread. I wish this was something the frontend community cheered about, not lamented. Those 200MB of node modules
by kevinflo 8y ago
This (or something like it) is always the top thread. I wish this was something the frontend community cheered about, not lamented. Those 200MB of node modules are developers ad-hoc cobbling together an alternative to xcode and android studio, except entirely modular and where we have complete control. Serious application development for the open web is hamstrung by limitations and definitely in an awkward growth phase, but it's marching towards a possible future of competing with native mobile apps and the two companies to which they're entirely beholden. To me, 200MB of tooling is not a sign of cruft, but of steady and imperfect progress.
Edit: and for the record, xcode is a 13.8GB install
- evanriley 8y ago> Edit: and for the record, xcode is a 13.8GB install Not to take anything away from your post, but you're comparing a complete IDE & Simulator with dependencies for building a website.
- hnmonkey 8y agoYeah, it is completely missing me how web application dependency libraries relate in any way to an IDE for building applications. I don't get this argument and it doesn't seem to me like it makes sense. Perhaps I'm wrong and there's a connection I'm not seeing. Can anyone clarify this?
- acemarke 8y agoThe point is that build tools take up disk space, and need to be installed. IDEs like XCode and Visual Studio bring along large quantities of libraries, headers, and other aspects of a C++ / C# / Swift / $LANG build toolchain. Front-end web dev now consists in large part of building highly interactive applications, not just static sites. That requires tooling. Therefore, it's not unreasonable to expect that the necessary tools will take up space, and there's plenty of prior precedent from other languages.
- ng12 8y agoThe lion's share of my node_modules are related to my development environment -- Webpack, Typescript, Babel, SASS, Jest, etc. A very small portion actually gets bundled into the dist.
- i_phish_cats 8y agovisual studio code and browser are about 50 mb each. That brings a complete web dev setup to maybe 300-400 mb. Oh and I can build desktop apps and mobile apps too with web tools, still never coming close to 10+gb.
- acemarke 8y agoYep. To repeat Dan Abramov's standard reply: > The set of dependencies that Create-React-App uses includes: > A compiler. a bundler/linker, an optimizing minifier, a linter, a development server with live reloading, and a test runner All of those are isolated and scoped to that one project, and they are all build-time dependencies only. It's also important to understand that Javascript packages are effectively distributed as source, which affects the number of files on disk. (Granted, many NPM packages do include unnecessary files in the published artifacts, but Javascript itself is a major factor there.) As you said, a full-blown IDE like XCode or Visual Studio is easily multiple gigs, and if you were to look at the actual file size on disk of any C++ compiler toolchain, that would be a minimum of dozens of MB - those are just usually preinstalled on Linux or Mac systems. So, context is pretty important here. A couple hundred MB for a complete JS build toolchain is understandable. I don't think it's necessarily _good_, and I think it can be improved a lot (especially with upcoming tooling like NPM Tink and Yarn PnP), but it's not the catastrophe many make it out to be.
- silverwind 8y ago> many NPM packages do include unnecessary files in the published artifacts This is the main reason node_modules grow so quickly. Many authors are careless on what files they include in their published packages. The npm cli now makes the package files and size visible during publishing, but I guess we need some way to shame authors publishing big packages, maybe by including size info on the npm website and downranking them in searches.
- lewisjoe 8y agoHere's an interesting observation from recent HN reactions to JS: + The hardcore server folks are hating JS these days, because it requires more than dropping a single script tag. + The full-stack people / JS beginners are hating JS with a passion, because they think it's unneeded complexity for their deadline. + Advanced JS veterans totally like how the JS ecosystem is rapidly maturing & solving its problems in interesting ways. And there's people like you (the latter), constantly explaining the former groups that JS isn't so bad. I'll see if I can write a blog (or a book if it has to be) on each part of JS ecosystem that has changed with detailed explanations on why it is better. I already wrote a piece along those lines - https://writer.zoho.com/writer/open/0y4wx08838bdbcf954b1398c28f7020a3a523 https://writer.zoho.com/writer/open/0y4wx08838bdbcf954b1398c... but I guess I (or someone else) can do better.
- nobody271 8y agoWait a second. Those 200MB of node modules are developers ad-hoc cobbling together an alternative to xcode and android studio, except entirely modular and where we have complete control. You just made up a fictional scenario and used it as the evidence for your case.