alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

Why can't modules be stored globally on a machine? #183

Closed ghost closed 7 years ago

ghost commented 7 years ago

Under Directory Structure in the README, it states:

A consequence of the require.resolve algorithm used by Node, all packages need to be stored in a project-level node_modules directory.

Can someone elaborate on the technical behavior of require.resolve that results in this constraint?