an image of a forest and water

Javascript: Tooling Wasteland

There is absolutely nothing worse than trying to get a Javascript application stood up. I have wasted hours upon hours upon hours trying to resolve issues just trying to include a library. Between different versions of node, or npm modules or different bundlers or frameworks, I seemingly have to spend more time trying to get the tooling right than actually sitting down to be productive. 

If it is webpack, it is a heaping pile of dogshit. Rollup - a heaping pile of horse shit. NPM? A giant clusterf*** of variable packages with varying issues to resolve. Every. F***ing. Time. 

This time:

  • Install Svelte
  • npm install 
  • npm run dev - the base works fine.
  • npm install [package]
  • add import for package
  • npm run dev

... then error, after error, after error just trying to import a library for use in Svelte. Rollup doesn't like some JSON in the package. Install the JSON plugin. `npm run dev` again and I get a blank page. There's an error in the bundle. Go to Stack Overflow and see if I can find any similar issues to point me in some direction. Try a couple out. No progress. Do some more searching and playing around with the order of plugins in Rollup. No worky. Then I get repeated errors about missing shims. Off to Stack Overflow. Some similar issues on SO but they seem to be very specific to the libraries being imported. 

... three hours later, I'm staring at a blank page with a reference undefined error that 'require$$0$3 is not defined'

For the level of shit PHP gets for bad language design and bad programming behavior, they've made quite a bit of progress over time. The Javascript ecosystem seems hell-bent on making the development experience the worse possible experience possible. There's no one guilty party here. You have multiple bundlers. You have multiple CSS pre-processors. You have multiple versions of the language that create subtle differences in how you have to work with different libraries. You have multiple package managers. You have multiple languages that will compile down to Javascript.

You have dependency trees that exponentially grow your project's node_module directory. In one fell swoop you can introduce a maga-f*ck-ton of security issues because libraries haven't been updated in years. NPM is nice to point out where there are security audit issues. But it just highlights how much cruft there is underneath the hood.


This article was updated on 5 Nov 2021