2 ms·
The problem isn't in the "package manager" it's in node.js node loads modules in a given pattern. Changing that pattern would be global to your project, and wo
by Klathmon 10y ago
The problem isn't in the "package manager" it's in node.js
node loads modules in a given pattern. Changing that pattern would be global to your project, and would cause issues with tons of 3rd party tools.
the best possible scenario would be to introduce a "new_node_modules" type directory and change to the new system, then look in "new_node_modules" first, then the legacy "node_modules" next, but that's a ton of work, a ton of 3rd party tool breakage, and a lot of possibility for new bugs and breakage for not all that much benefit.
That's not to say it shouldn't be done at some point, just that there are much bigger areas that need to be addressed sooner in the node ecosystem.
- moderndeveloper 10y agonode's module resolution will not likely ever be fixed. Too many modules depend on its undocumented implementation details and there isn't the will to improve it. A major source of problems is node's symlink resolution scheme that depends on fully resolved paths, counter to how other UNIX programs use files. Because many module developers know how the resolution scheme works they often hard code behaviors and paths into their code that would basically prevent any alternative module resolution scheme from working.