letswritecode icon indicating copy to clipboard operation
letswritecode copied to clipboard

Why does my node_modules folder have so much more stuff than yours?

Open binarybill opened this issue 7 years ago • 1 comments

It seems like for every project I make it has to download so much stuff.

Also fyi, when I do "npm i browserfy" it gives a warning about fsevents. I think because fsevents is only for mac systems and I am using linux for development.

And thanks for your awesome tutorials !!

binarybill avatar Nov 05 '18 00:11 binarybill

It's likely the version of npm I was using at the time in the video. Previous versions of npm would nest dependencies more often:

node_modules/
  parent_module/
    node_modules/
      child_module/

Due to npm being used more for front end and other reasons, compatible modules are moved to the top level folder now with newer versions of npm:

node_modules/
  parent_module/
  child_module/

So it looks like more but it's the same. It was just more hidden in child node_module folders in the past.

shama avatar Nov 05 '18 16:11 shama