Learning Angular, starting with a hello world example:

$ ng new wtf
added 1180 packages from 1294 contributors and audited 21849 packages in 18.753s
found 13 vulnerabilities (9 low, 4 high)

Oh, great! Broken from the get-to! But wait, there's more joy!

$ vimdiff wtf/node_modules/is-odd/node_modules/is-number/index.js wtf/node_modules/is-number/index.js

Fresh project, is-odd requires is-number, the project itself requires is-number. And is-number is there twice in two different versions. The notion of a number must have changed drastically in the last couple of years!

Seriously? Angular doesn't even give me the chance to fuck up the dependencies on my own!

  • 2
    Just npm things.
  • 2
    You may want only a hello world, but angular comes with a lot of features bundled in.

    For example routing, components, forms, dependency injection, etc. You also need incremental compilation, typescript, karma and bunch of other dev tools.

    That's what the modules are for. A compiled build for production is usually much smaller. Don't blame the framework, that's just how most frameworks are designed.
  • 2
    @hashedram Those two stupid fucking modules don't have anything to do with "routing, components, forms, dependency injection, incremental compilation, typescript, karma and bunch of other dev tools"!

    Just because Angular can do a lot doesn't mean that getting the most basic shit to work should require a lot.

    "Don't blame the framework, that's just how most frameworks are designed."

    Like "don't blame the Nazi, that's the way Nazis act".
  • 0
    @fjmurau they probably are used by one of those as internal dependencies. It's probably as simple as you stopping the package updates half way or something. I've been using it for years and getting angular running is simple enough.
  • 0
    @hashedram i can literally include the entire vuejs framework with a script tag tho
  • 0
    @sharktits well yes. That's because vue is a gift from the gods and angular was made by *cough* google
  • 0
    Angular (the new ones) aren't great for prototyping and small things, AngularJS (yes it's different) or the 1.x branch is great for it though.

    The sheer scale of the new Angular frameworks is mind boggling, I'm not too sure whether most of these ridiculous packages are angular's dependencies or angular's dependencies dependencies (repeat ad infinitum).

    That warning you saw is an npm security audit, not entirely sure on the details of how they do it but they've decided there's vulnerabilities... Somewhere in that hilariously large tree
  • 0
    @hashedram Yes, it's simple, but I'm not stopping the updates halfway through, I don't do any fucking updates, I just did what I wrote in my post!
Your Job Suck?
Get a Better Job
Add Comment