Live data from Hacker News

Huge no. of files for Angular 2

stackoverflow.com

11–20 of 105 posts

Re: Huge no. of files for Angular 2

#11
post #8

Evaluating a framework by the number of files its dependencies are broken into is a a pretty poor measure of quality.

Why? If framework X does roughly the same as framework Y which is 50% in size then you can estimate that the code of Y is more effective.

Re: Huge no. of files for Angular 2

#12
post #4
post #3

Has npm finally figured out how to de-dupe dependencies? In one project, I have something like 47 copies of the same version of the same library, distributed at all levels of the node_modules hierarchy. I try not to think about that JS tooling too hard, lest I start pulling my hair out and devolve into a screaming crazy person.

This sucks so hard. It's also quite easy to hit path length limits for certain operations (on windows) when you have this mess there.

Totally. We just ran into this issue. Running npm install inside a linux vm resulted in an endless loop, because the nfs mapping created path names that exceeded the length limit.

Re: Huge no. of files for Angular 2

#13
post #12
post #4

Earlier quoted context omitted.

This sucks so hard. It's also quite easy to hit path length limits for certain operations (on windows) when you have this mess there.

Totally. We just ran into this issue. Running npm install inside a linux vm resulted in an endless loop, because the nfs mapping created path names that exceeded the length limit.

it's like an entire eco-system is fundamentally broken

Re: Huge no. of files for Angular 2

#14
post #11
post #8

Evaluating a framework by the number of files its dependencies are broken into is a a pretty poor measure of quality.

Why? If framework X does roughly the same as framework Y which is 50% in size then you can estimate that the code of Y is more effective.

Number of files is not the same as size, especially with the way node modules tend to be structured.

Re: Huge no. of files for Angular 2

#15

This person is counting the node_modules directory. While JS is a bit insane and this directory will have a ridiculous number of files, they are concerned: "because my deployment (google app engine) allows only 10K files" meaning, they don't realize that node_modules is for development and not related to the application they would actually deploy.

Hope this comment stays at the top before all the "wow JS sucks!!!" people arrive :-) Though to be fair a "modern" JS dev environment does use a ton of stuff!

IIRC Angular 2 production builds are actually pretty efficient.

Re: Huge no. of files for Angular 2

#17
post #5

32,000 files for a hello world... jeez, i'm going back to java.....

Not a lot better:

  $ unzip -l /usr/java/jdk1.8.0_77/jre/lib/rt.jar | wc -l
  20138
It's just less of a burden on the host filesystem because those files are usually loaded straight from the jar (i.e. zip file).

Re: Huge no. of files for Angular 2

#18
post #5

32,000 files for a hello world... jeez, i'm going back to java.....

Not a lot better: $ unzip -l /usr/java/jdk1.8.0_77/jre/lib/rt.jar | wc -l 20138 It's just less of a burden on the host filesystem because those files are usually loaded straight from the jar (i.e. zip file).

[deleted]

Re: Huge no. of files for Angular 2

#19

This person is counting the node_modules directory. While JS is a bit insane and this directory will have a ridiculous number of files, they are concerned: "because my deployment (google app engine) allows only 10K files" meaning, they don't realize that node_modules is for development and not related to the application they would actually deploy.

Hope this comment stays at the top before all the "wow JS sucks!!!" people arrive :-) Though to be fair a "modern" JS dev environment does use a ton of stuff! IIRC Angular 2 production builds are actually pretty efficient.

> Though to be fair a "modern" JS dev environment does use a ton of stuff!

Though to be fair a "modern" JS dev environment does use a ton of unnecessary stuff!

I fixed your comment.

Re: Huge no. of files for Angular 2

#20
Interesting fact that I recently came across:

bower and many other npm packages, has some dependencies that eventually depends on a package called "wordwrap".

And this "wordwrap" package somehow has its test folder exposed in npm.

The result:

Every single person using bower would have one or more copies of In Praise of Idleness by Bertrand Russell on your local machine, depending on how many of your projects has a npm dependency of this package:

https://github.com/substack/node-wordwrap/blob/master/test/i...

Don't believe me? Try searching for "In Praise of Idleness" in Spotlight.

Edit: Someone had already sent a PR about this on GitHub: https://github.com/substack/node-wordwrap/pull/14

Post reply on HN