Even javascript itself isn't "bad". There are ugly parts but anything written in the modern spec is basically semantically the same as any other language like python.
The problem is that people writing packages on the backend are bootcamp grads, frontend devs, and any number of other people who don't take the backend as seriously as someone who has been devoted to it using a non-javascript language.
I think the other issue is the javascript community wants to reinvent itself every couple months, instead of having one project that becomes defacto for x function over many years.