- JS doesn’t have a proper standard library and so you tend to have many more dependancies in a project than with other languages.
- Because of that you then have a very large tree of dependancies, often with incompatible version requirements of the same package.
- Due to the nature of needing to “bundle” your code for distribution on a “slow” network, a lot of optimisations (tree shaking, code splitting, async module loading) are required to minimise your bundle size.
- You say “We only have a few module types”, that’s two more that every other language. And they are incomparable in subtle ways.
Those and some other issues are completely unique to the web platform, they are some difficult problems to solve.
However, I think the current generation of tooling has finally got there. Vite, with its esbuild and Rollup backend is bloody brilliant. If you use a framework with official Vite support it just works.