Why doesn't NPM first check if the package is already installed locally?
And then a symlink or something of the sort could be created - or perhaps even a copy of the module in question. Why isn't this the way npm works?
If I initialize 10 different projects, and they all need React, I'd presumably do npm install react 10 distinct times. Which is fine, since each app is standalone - but why "waste" bandwidth by making separate requests for each one?
2 comments
[ 3.0 ms ] story [ 23.5 ms ] threadIt doesn't do symlinks (PNP mode does) because this doesn't always work well and it definitely doesn't work well on Windows.
See: https://classic.yarnpkg.com/en/docs/cli/cache/