On Tue, Mar 20, 2012 at 1:18 PM, Mark Hahn <m...@hahnca.com> wrote:

> Don't I have to install coffee-script globally to be able to use the
> `coffee` as a command anywhere?  Same with node-dev, node-inspector, etc.


Right, they have to be installed somewhere in your $PATH.  This doesn't
have to be the "global" place, but it does work out of the box since it
uses the same bin folder as node itself.  non-global installs put the
executables in ./node_modules/.bin/, "global" installs put it in
$PREFIX/bin/ where $PREFIX is where you installed node to. (nvm uses a
custom $PREFIX per node version and puts $PREFIX/bin in your path)


>
> On Tue, Mar 20, 2012 at 10:40 AM, Tim Caswell <t...@creationix.com> wrote:
>
>> Keep in mind that it's best to not install libraries globally.  It safer
>> to just declare your dependencies in your app's package.json and install
>> them locally using `npm install`.  This prevents a world of headache with
>> version mismatches.  I only use global installs for things like `lessc`
>> `share` (from creationix) and other modules that install command-line
>> scripts.  It's probably best to put them somewhere that other modules won't
>> find like /usr/local/share and just put /usr/local/share/node_modules/.bin
>> in your PATH. (I recommend not using NODE_PATH)
>>
>>
>> On Tue, Mar 20, 2012 at 12:33 PM, Mark Hahn <m...@hahnca.com> wrote:
>>
>>> It is not a big deal since I have only 2 or 3 global modules, but I got
>>> tripped up when releasing to another server with different nvm location.
>>>
>>> I'll take your suggestion to use a common install dir and put it in the
>>> path.  I didn't know modules were searched by path.
>>>
>>>
>>> On Tue, Mar 20, 2012 at 10:31 AM, C. Mundi <cmu...@gmail.com> wrote:
>>>
>>>> I used to do something like this...
>>>>
>>>> Install global modules to a version-agnostic
>>>> /use/local/share/node_modules and always export NODE_PATH (or similar).
>>>>
>>>> But what I found is that I ended up chasing breaking changes when
>>>> updating node anyway.  So I have jumped on the wagon and now the only thing
>>>> I install globally is express.  And I am so anxious about adapting to
>>>> express 3...
>>>> On Mar 20, 2012 10:08 AM, "Mark Hahn" <m...@hahnca.com> wrote:
>>>>
>>>>>  I love nvm and npm.  However, whenever I switch to a new version of
>>>>> node with nvm I have to reinstall all my global npm modules.  Apparently
>>>>> the global modules are stored in the node directory which is created anew.
>>>>>
>>>>>  Is my setup normal?  Is there a way around this problem?
>>>>>
>>>>>  --
>>>>> Job Board: http://jobs.nodejs.org/
>>>>> Posting guidelines:
>>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "nodejs" group.
>>>>> To post to this group, send email to nodejs@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> nodejs+unsubscr...@googlegroups.com
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>>
>>>>  --
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines:
>>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>> To post to this group, send email to nodejs@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> nodejs+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>
>>>
>>>  --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to nodejs@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>
>>  --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to