The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Reduce memory usage on install
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.
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.
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).