almost nobody is using erlang. one of the best languages out there.
Actually, that's a myth.
One of the reasons why Betamax lost is because a tape could only contain one hour of film, so you needed at least two tapes for a single movie. VHS didn't have this limitation.
The only reason js has any success at all is the web.
Another aspect is the fact that many of the Javascript's problems were actually not problems of the language itself but of the environment around it, like DOM and AJAX implementations in different browsers.
Besides those major problems, the language itself has some minor problems. But as you pointed out the language has a very active ecosystem around it, which creates at least 5 solutions to every problem. But many solutions involve new languages which compile to javascript. So practically the problems are solved but the theoretical use case of writing plain Javascript is still a little problematic.
It is not even object oriented, so instead it is commonly used with the prototype approach.
It is not a functional language either as functions can define global variables, therefore they aren't actually functions. And defining global state is the default behaviour.
Why did you choose JS again?
This is why there have been so many languages built on top of it.