Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That recursive node_modules or whatever it is called was what made me hate this whole npm thing, specially because it is not centralized somewhere in my computer. And that means the same files a few times repeated on my drive just eating space. Being a Java developer I don't understand why the approach was not more like maven.


npm does a decent enough job deduping shared packages. The reason is different packages consume different versions of things. Java only lets you have a single version of a package. If the API changes, it can be a pain when your dependencies were written for different versions. That slows adoption since you have to wait until everyone you depend on has updated first.


Are you thinking of the new flat-tree npm? Because in my 1.3.10 installation, I see this:

    $ find node_modules/ -type f | wc -l
    56278
    $ find node_modules/ -type f | xargs md5sum | gawk '{print $1}' | sort | uniq | wc -l
    8545
That's a lot of duplicate files.


its a long standing issue, and gets worse when there is node_modules inside node_modules inside node_modules ... so on that someone suggested renaming node_modules to n_m . https://github.com/nodejs/node-v0.x-archive/issues/6960#issu...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: