Reduce memory usage on install

(Anthony Gonzales) #1

Our company moved to pnpm in order to reduce duplication of module installs between applications within a monorepo. When someone attempts to work between applications, they end up with a hard drive full of node_modules. I would like to see npm intelligently reduce duplication of nodule_module versions to cut down on memory consumption.

(Rebecca Turner) #2

Have you looked at the work with tink? Amongst other things, it eliminates copying modules into node_modules entirely. The plan is that it will be integrated into npm itself later this year.

(Roy Revelt) #3

or lerna? Additional benefit of lerna is that not only some installs are made redundant (because your dependencies are inter-linked) but also installing is skipped completely (if it’s one of your dependencies β€” since those will be linked from source nearby, not installed).