Fix www/node to load globally installed modules by default

2012-01-04 Thread Jeremy Evans
Currently, if you install a node module using npm install -g, you aren't able to require it after install unless you add the global node_modules folder ($LOCALBASE/lib/node_modules) to NODE_PATH. This behavior seems wrong to me. Here's a patch that adds the global node_modules directory to the de

Re: Fix www/node to load globally installed modules by default

2012-01-05 Thread Aaron
I am not sure this is the best idea as it flattens the "namespace" modules can exist in. For example, I have a few projects that have a module installed locally with "npm install node-cron@latest" and I have a node-cron in /usr/local/lib that is at an older version ( npm install -g node-cron )..

Re: Fix www/node to load globally installed modules by default

2012-01-05 Thread Jeremy Evans
On Thu, Jan 5, 2012 at 9:16 AM, Aaron wrote: > I am not sure this is the best idea as it flattens the "namespace" modules can > exist in.  For example, I have a few projects that have a module > installed locally >  with "npm install node-cron@latest" and I have a node-cron in > /usr/local/lib tha

Re: Fix www/node to load globally installed modules by default

2012-01-05 Thread Aaron
Tested ( amd64 ). The order of precedence is indeed working like you said. OK. On Thu, Jan 5, 2012 at 10:43 AM, Jeremy Evans wrote: > On Thu, Jan 5, 2012 at 9:16 AM, Aaron wrote: >> I am not sure this is the best idea as it flattens the "namespace" modules >> can >> exist in.  For example, I