I'm responding to your thread—the one where in response to your suggestion that it would be a good thing if it were possible to prevent "this" (presumably the introduction of JS in 1995, the topic of the submission), the person replying to you wrote, "I know it's the fashion on HN to hate Javascript[...] It's not Javascript's fault the language was ruined by SV and survellance capitalism."
The things you're complaining about are not a JavaScript problem. They're a programmers-who-have-their-feet-firmly-planted-in-the-world-of-NPM-and-modern-webdev-tooling problem.
> something similar to Electron[...] is something I "hate"
Wait till you find out how Firefox itself (i.e. the UI and other application logic) is implemented: "DOM, CSS and plain JavaScript". Mozilla was doing Electron-style apps before Electron ever existed. Somehow it's a higher quality app than the sorts of things you had in mind when you brought up Electron. Again: that's because it's not a JavaScript problem.