-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
For the sake of brevity, I'm going to assume Unix-like OS with iojs/node executables installed in /usr/local/bin but this issue is for every/any OS and any sane installation path.
The global path for modules includes /usr/local/lib/node (again, assuming the situation in the first paragraph). That just seems wrong. I can't tell if the correct thing is to include /usr/local/lib/node_modules instead or if the above path should just be removed. (Or maybe I'm misguided and there's a reason it's /usr/local/lib/node and should stay that way. But it sure looks like a bug...)
I'm inclined to remove the path unless there's a good reason to keep it. Adding /usr/local/lib/node_modules might be cool/expected, but that would arguably be a pretty big behavior change (suddenly, require() starts finding all your globally installed modules, which exposes the user to the possibility of dependency hell) that would probably warrant a lot of discussion. On the other hand, removing a useless path seems much lower stakes.
Am I right that it's a bug? Or is there some magic I don't know about?