TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why is Node.js hated so much?

60 pointsby hidden-spyderover 3 years ago

40 comments

ufmaceover 3 years ago
Probably the worst thing is that the standard library with Node Javascript is tiny. Therefore, you have to pull in a pile of NPM packages to do pretty much anything. The package ecosystem is rather messy for the same reason - there&#x27;s a mountain of tiny packages doing a few little things because somebody needed to do just a few things and didn&#x27;t want to pull in some massive library that does a ton of stuff including the thing they need to do. Which then leads to a lot of bigger and more useful packages having huge dependency trees of tons of little packages, all at poorly-managed versions that usually can&#x27;t be shared with any other big packages. So a program that needs, say, 3 major packages to do something useful might end up with thousands of dependencies taking up hundreds of megabytes, often with 3+ copies of the same package at different versions.<p>For example, I have a little webapp that I built with create-react-app with typescript and redux. Very convenient overall admittedly. It&#x27;s not very big, maybe 1k lines of code total, and 3 fairly minor packages added to do various things. The node_modules folder has over a thousand items in it, and takes up 350MB. The yarn.lock file alone is half a megabyte. Ahem, what the hell? At least the built artifacts are pretty small.<p>This might be seen as just a problem with create-react-app. But in my experience so far, pretty much everything in the Node world does this. Seriously, has anyone managed to do something useful in the Node world without ending up with a thousand packages?
评论 #28792567 未加载
评论 #28729125 未加载
评论 #28796452 未加载
评论 #28816992 未加载
评论 #28796728 未加载
评论 #28790372 未加载
评论 #28834134 未加载
评论 #28729115 未加载
评论 #28729264 未加载
dolniover 3 years ago
JavaScript is a language whose flaws are well understood by experienced developers, and those flaws are massive.<p>I also don&#x27;t particularly care for &quot;async everything&quot; by default. It makes your program more difficult to reason about. Rather than dealing with concurrency in a subset of your application, you now have to worry about it _everywhere_. There are only a few classes of software where the async-everything approach even makes sense.<p>Throw in the fact that the ecosystem is an absolute dumpster fire and you have more than enough justification.
评论 #28729621 未加载
评论 #28729472 未加载
评论 #28758365 未加载
评论 #28729206 未加载
评论 #28729311 未加载
评论 #28728906 未加载
评论 #28730043 未加载
评论 #28731550 未加载
ruffreyover 3 years ago
Node is hated because programmers are highly opinionated (not in a negative way). Everything with huge usage gets hate, because everything has flaws and trade offs. People get forced to use it at work, sometimes to solve the wrong kinds of problems for it&#x27;s strengths, which amplifies the dislike. It&#x27;s the nature of the beast.
评论 #28729527 未加载
评论 #28729216 未加载
评论 #28729351 未加载
评论 #28730465 未加载
The-Brentover 3 years ago
Here&#x27;s the thing. JS does not suck. Node does not suck. They exist and are widely used precisely because they do not suck and deliver many advantages that are preferred by many developers over alternatives.<p>I hate Python and could go on all day about what&#x27;s wrong with it, but it doesn&#x27;t suck. I use it when it is appropriate for the task at hand, but find it is rarely the best language for the job - given what I know and what I prefer.<p>Most people that hate a language also avoid it and, therefore, tend to not have made their peace with its shortcomings, so don&#x27;t have an honest reckoning.<p>It is unfair to completely disparage a language until you have fully figured out how to understand and work with it, warts and all. Frankly, until then, you aren&#x27;t yet informed enough to make a summary judgement. You are just cherry-picking your dislikes.<p>I have rarely heard a criticism that did anything but highlight the critic&#x27;s lack of knowledge. For example, there is a common criticism about the lack of a standard library. Well, that is how the ES or Node ecosystems are structured. It is not a flaw - it is just a different approach. If you work intelligently within that paradigm, it is actually quite nice. If you hold onto your expectation that a standard library is a part of any respectable ecosystem, you&#x27;re going to be perpetually dissatisfied with ES&#x2F;Node. It may not be what you like or expect, but it is not inherently wrong or lacking.<p>Parenthetically, anyone who makes the standard library complaint about Node just doesn&#x27;t know Node. It has a very complete set of functionality natively, for its purpose. It is not going to offer much in the way of math operations, sorting algorithms, etc. That is not its purpose. If you want those things, you can add them.<p>If you think that a given dependency is too big, too small, incomplete, or poorly managed, write your own, and publish it like many have done.<p>But be warned - if it gets popular, there will be no end of complaints about what&#x27;s wrong with your library because ... well ... it is actually developers who suck. We have opinions and are quick to convince ourselves that those opinions are fact and anyone who disagrees is not as smart as we are.
jmknollover 3 years ago
Something that I don&#x27;t see mentioned here, but which I believe drives a lot of the controversy around Node, is that it takes an extremely unopinionated approach to web development.<p>That is, Node.js out of the box is really just a javascript runtime. You need a package to serve html, you need to decide on an application architecture and organizational structure, you need to choose an ORM. You need to make a lot of decisions that other web frameworks like Django or Rails just make for you when you build a project.<p>The lack of opinionated defaults has some benefits: - It gives you a ton of flexibility - It makes it easy to learn the framework, since there&#x27;s no magic. - It forces the team to really understand what the application does from first principles, again since there is no magic.<p>The other side of this coin is that flexibility often leads to architectural chaos, and working with Node can feel very slow, since you&#x27;re constantly reinventing the wheel.<p>The reality is that 80% of the things I&#x27;m building basically just need some variety of MVC with a reliable and predictable way to connect to a SQL database, and Node doesn&#x27;t feel like the right tool for that job.
评论 #28791244 未加载
farleykrover 3 years ago
Can’t remember where I first heard this but I think it applies here: There are two kinds of programming languages. Those people complain about and those no one uses.<p>EDIT: To add a more constructive comment: Don’t worry too much when people hate on a given language and don’t try to make a decision based on what tool or language people are complaining about. Every tool has its usefulness and its drawbacks.
评论 #28733866 未加载
recursivedoubtsover 3 years ago
Because of this:<p><a href="https:&#x2F;&#x2F;i.redd.it&#x2F;h7nt4keyd7oy.jpg" rel="nofollow">https:&#x2F;&#x2F;i.redd.it&#x2F;h7nt4keyd7oy.jpg</a><p>I remember back in the late 2000&#x27;s&#x2F;early 2010s, there was a blogger, I think at google, who claimed that &quot;the next programming language has already been chosen for you&quot;. In retrospect, he was clearly talking about javascript, which got a tremendous push from the big tech players despite all its obvious problems. Now we are stuck with a mess of code written in an ugly language.<p>Why the big guys picked javascript, I don&#x27;t know. Maybe to ensure that everyone was so bogged down in dependencies, language incompatibilities and callback hell that no competitors would arise?<p>EDIT: It was Steve Yeggie, back in 2007: <a href="https:&#x2F;&#x2F;steve-yegge.blogspot.com&#x2F;2007&#x2F;02&#x2F;next-big-language.html" rel="nofollow">https:&#x2F;&#x2F;steve-yegge.blogspot.com&#x2F;2007&#x2F;02&#x2F;next-big-language.h...</a>
评论 #28731332 未加载
评论 #28731351 未加载
bob1029over 3 years ago
For me, it&#x27;s less an equation of active hate. I can actually see why some people like it, and I wouldn&#x27;t want to get in anyone&#x27;s way on that.<p>That said, I have found that the .NET ecosystem is an agreeable way to build the kind of software I need to build. I don&#x27;t think my product would be infeasible in a Node.JS ecosystem, but it would certainly be more painful for reasons that are specific to our problem domain.<p>If I had to take a shot across the proverbial HN language war deck, I would say that dependency management is the biggest reason I would prefer to avoid Node.JS on future projects. I have a very complex .NET code base which uses 3rd party dependencies you can count on <i>one</i> hand. Our customers really enjoy that kind of thing.
swmanover 3 years ago
It’s hated by people who have either never bothered with it and are on the JS hate train, or it’s hated by people who had to deal with poorly executed code. If you know the use case fits, then it’s great and will help you scale fast at minimal cost. However that takes a bit of experience to understand&#x2F;implement.<p>It has some flaws sure, but unless you’re going out of your way to use poor practices or using node for a task it isn’t great for, that’s kinda on you right?<p>Used node for many things, including services currently in use by many millions of users. It’s just a tool in the toolbox, so use it like one where it makes sense.
0x456over 3 years ago
My guess is because:<p>- lots of people don&#x27;t like Javascript<p>- lots of people don&#x27;t like V8<p>- the guy who made Node.js (Ryan Dahl) doesn&#x27;t like it either<p>- programmers think anything without thread support is a toy<p>I like Node.js, Javascript, and Ryan Dahl, and have no strong opinions on V8.
评论 #28728707 未加载
评论 #28728861 未加载
bdcravensover 3 years ago
Being heavily coupled to the front-end. There&#x27;s a perceived attitude that many Node devs are just front-end devs with enough back-end knowledge to be dangerous. With this is the overloading of the term &quot;full stack&quot;.<p>The early perceived coupling with MongoDB didn&#x27;t help.
bithavocover 3 years ago
I used to hate it, but async&#x2F;await, typescrypt and ts-node makes it more acceptable nowadays.
评论 #28729145 未加载
lvl100over 3 years ago
I don’t think it’s Node that people don’t like. It’s more the ecosystem and developers around it. An example would be people focusing more on branding and landing pages.
评论 #28729236 未加载
smoyerover 3 years ago
I don&#x27;t hate node, I just realized that on the server-side, by the time I added enough modules to make something work I could get better performance from a Jakarta EE application server and write far less code.<p>Go&#x27;s standard library comes with a lot of the same batteries built in and while I write more code in Go, the compiled binary is small (good for container management) and I use less dependencies.<p>So that last sentence is the key. When I was writing a lot of Java, I learned to curate my dependency graph carefully. When writing in Go, I&#x27;ve become even more careful to only use widely-adopted packages though I&#x27;m a bit more lenient with test-only package.<p>I&#x27;ve predominately stopped using Node.js because it&#x27;s dependency graph is simply unmanageable. Node.js itself provides a facade of multiprocessing as well as other niceties you&#x27;d expect to find on the server-side but to do anything substantial you either need to code it yourself or you adopt a huge dependency tree. Downstream security vulnerabilities and bugs mean you&#x27;re continuously updating versions and it&#x27;s not always pretty.<p>Now that I&#x27;ve adopted the write a bit more code and use fewer dependencies mentality, perhaps I should try another project in Node.js. I have to admit that Typescript (and even some of the EMCA improvements) also make it more attractive.
muglugover 3 years ago
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” —— Bjarne Stroustrup
dogberryover 3 years ago
Full Stack. Now, that&#x27;s a dirty composite in some corners and rarely entirely true-- but in some cases... backend (Node) and front-end (let&#x27;s say React) are not handled by two developers, but one. They might also sing the theme tune. That flexibility regardless of the fat wad of packages, is both profitable (in the short term) and valuable in the long term as a proof of concept. Who develops something and says &quot;that&#x27;s done, finished, everlasting&quot;? It&#x27;s useful to have a combined ecosystem in many cases, accessible and friendly to a single, dare I say it, &quot;Full Stack&quot; developer. If it needs to be made better, if it needs refactoring, everything is on the table until it doesn&#x27;t make sense. If the product works great... if it needs to move away from node, fine. If you build a house that&#x27;s worth looking at, nobody&#x27;s thinking about the bricks, but that doesn&#x27;t mean things should stay as they are.
RobertWHurstover 3 years ago
It&#x27;s not.<p>I work with a range of languages - go, rust, python, ruby, and yes even JavaScript. In my 15 years as an engineer most of the engineering teams tasked with a node project I&#x27;ve worked with enjoyed it quite a bit. Those who didn&#x27;t struggled because they were still learning the more functional patterns used in the node community, and it required some relearning given the languages they came from. In my experience 99% of the time those who express a hatred for node have never programed with it, or lack experience. Now given that there are shortcomings like any tool or language. But hating it - doesn&#x27;t make any sense to me unless your ignorant of it. It&#x27;s a fantastic programming environment. By the way if anyone thinks that JavaScript is on the same level as PHP I invite you to visit PHP sadness.
6510over 3 years ago
For a front end language designed in 2 weeks it is quite good. That we are stuck with it is kinda sad but its good enough.<p>If you design a tool (or DSL) you must tailor it to the problem it needs to solve. It must not be overly generic while still covering the entire scope. This is extremely hard and it usually takes a few versions for a language to get it right.<p>Then we take the DSL and implement it in an entirely different situation(????) <i>Look, I can use my wrench to hammer in nails!</i><p>What to say? The nails are indeed going in. Massive structures are erected. They are structurally sound but it just doesn&#x27;t look professional to people who are used to hammers. I&#x27;m going to be using a hammer until end of time. I tried holding the wrench over the nail but I just couldn&#x27;t bring myself to hit it.<p>(with hammer I mean PHP)
评论 #28816265 未加载
xaduhaover 3 years ago
It was like mold that suddenly grew everywhere. Monopoly of JS in browsers translated into a big share of server-side pie too. People had all the options and they chose JS still, not a situation to be happy about if you ask me.
Raed667over 3 years ago
It is hated so much because it is used so much. If it was a niche or obscure platform then no-one would have cared.
评论 #28729183 未加载
评论 #28729233 未加载
Pabblo001over 3 years ago
I would be very appreciated if somebody could answer me :)<p>First of all: 1) I&#x27;m a self-taught developer 2) I spend last year building my app on MERN stack<p>The problem with JavaScript technologies is that you have to add many dependencies into your project. Each module &#x2F; library &#x2F; framework has their own documentation which is time consuming if you are self-taught to go through it<p>The question really is: - Is .NET or any other framework so called &quot;battery included&quot; ? or I also need to add hundreds of dependencies i.e. authentication -&gt; password hashing, jsonwebtokens etc.. - As .NET or any other framework requires more code vs Node.js -&gt; does it pay off later on during refactoring? Means is it more productive vs any JS framework?<p>I&#x27;m really considering to spend next year learning C# with .NET because being solo dev it&#x27;s really time consuming constantly monitor what did change and what needs to be refactored. JS stack doesn&#x27;t help with maintaining the project in a long run (or I have limitted knowledge) it is really time consuming stack tbh<p>I agree that creating a simple CRUD app for web course it is easy but if you need to do something more advanced...<p>Should I start learning C# ? or .NET also require thousands of depedencies i.e. file upload (multer docs!!! Man I know them almost by heart now...)
评论 #28810660 未加载
评论 #28730250 未加载
vesuvianvenusover 3 years ago
I&#x27;ve only run into one person IRL who smacktalks Javascript. Then later I edited his Ruby script. And I was like &quot;uhh... this could all be done in nodejs, or python, it really doesnt matter&quot;. He said javascript is a toy language.<p>Whereas... I had worked with php, python, R, and once I got to NodeJS I fell in love with it. Then picked up ReactJS<p>And man, so glad I went this route. I never have to apply to jobs again, given the hunger of recruiters for full stack JS devs
gtirloniover 3 years ago
Many people here mentioned the dependency hell in Node. Why dont the core Node developers work on improving their standard library?
评论 #28731453 未加载
sergiotapiaover 3 years ago
A tiny project in javascript&#x2F;nodejs land has a bonkers node_modules folder full of files upon files upon files. The whole ecosystem is rotten, top to bottom. I personally know many devs who have hit the eject button and now just code in Elixir. They opted out of the lunacy that is nodejs&#x2F;javascript.
pixelgeekover 3 years ago
I think about Node.js the same way that I think about the set of wrenches I have downstairs. It is a tool that I use for specific tasks. It lets me do some things in JS that I wouldn&#x27;t normally and it does it efficiently enough that I don&#x27;t need to look for other tools.<p>I don&#x27;t use it for full applications so I don&#x27;t have some of the same issues that @ufmace mentions (ouch!) and those are clearly a problem.<p>I suspect that a lot of the hate comes from people that would like a better Node.js so they could use it but resent that it isn&#x27;t available
dyejeover 3 years ago
Why do you think it is hated? Seems to be one of the most popular backends right now. Personally, I dislike the lack of convention and immature library ecosystem.
评论 #28729284 未加载
0x456over 3 years ago
On the question of &quot;is it hated&quot;, Stackoverflow publishes a survey every year on interesting questions like this. It doesn&#x27;t get a lot of attention here for whatever reason.<p><a href="https:&#x2F;&#x2F;insights.stackoverflow.com&#x2F;survey&#x2F;2021#most-loved-dreaded-and-wanted-language-love-dread" rel="nofollow">https:&#x2F;&#x2F;insights.stackoverflow.com&#x2F;survey&#x2F;2021#most-loved-dr...</a>
drbojingleover 3 years ago
I have no personal issues with JS&#x2F;Node.js except that when I was learning it there were so many different ways to create objects that it took me a while to sort out how I wanted to do it and what all the trade offs are.
BuckRogersover 3 years ago
I don’t like it because I don’t enjoy JS. Node itself seems great, it just needs a large standard library and mandate some form of Typescript. Even if it had those changes I’d stick to C# or take a look at Elixir.
dsegoover 3 years ago
Because it doesn&#x27;t require __init__.py in every directory?
midrusover 3 years ago
Node and JavaScript are extremely popular (used by a ton of people).<p>Being popular means you get a lot of criticism. Same happens to java, PHP, and any other popular language.
singularity2001over 3 years ago
To me it&#x27;s the async function coloring mess of js which made node unattractive. ( together with the import require mjs split )
wayneftwover 3 years ago
It&#x27;s liked and used more than it&#x27;s hated.<p>I think this is self evident but maybe someone else will care to list some usage statistics.
评论 #28810682 未加载
jgb1984over 3 years ago
My experience installing several tools that are built on nodejs has led me to the conclusion that I will simply not use something if it&#x27;s made with nodejs. I&#x27;m not installing 127 dependencies just to get some tiny CLI tool to run. Give me any Linux tool written in Rust, Go, C, C++, Python, it always goes well and without fuss. But nodejs and ruby based software has given me nothing but headaches.
clipradiowalletover 3 years ago
Node has a low barrier to entry(JS), and that shows in the quality of the work. If anyone remembers QBasic, it was hated for the same reasons. It&#x27;s great to grasp core concepts with, but inappropriate to build something like an ERP system. It&#x27;s a toy, although a powerful one.
tluyben2over 3 years ago
I think it is liked quite a bit, but if I had to point out; 1) the ecosystem; it is rotten 2) people think JS is the old JS which had callback hell and other misery: there still is misery but less and with Typescript it is ok. But I think not as many hate it vs like it.
ochronusover 3 years ago
I don&#x27;t think it&#x27;s hated. Tons of node lovers out there :)
craftomanover 3 years ago
Node.js hated by developers cause of JavaScript, the most hated language. It&#x27;s simple.
sto_hristoover 3 years ago
Considering its popularity, vast ecosystem, and widespread use, you can&#x27;t just state that it&#x27;s hated so much - that is just your impression based on few very noisy people.
评论 #28731255 未加载
vince14over 3 years ago
I think many people feel threatened by the success and the pace of the Node.js ecosystem.<p>Most arguments, even in this thread already, are just wrong. Obviously they have never had any experience with the Node.js ecosystem and another.
评论 #28729175 未加载