The nicest way I've found for multiple separate node installs is nodeenv. It 
works just like Python's virtualenv:

Install a version:
% nodeenv -n 0.6.10 /path/to/node-0.6.10

Use a version:
% source /path/to/node-0.4.6/bin/activate

Now the correct node and npm are in your path. Simples!

To install it just pip install nodeenv (it's a Python script).

Cheers,
Dan
-----Original Message-----
From: Thomas <[email protected]>
Sender: [email protected]
Date: Sun, 26 Feb 2012 09:28:06 
To: <[email protected]>
Reply-To: [email protected]
Subject: [nodejs] What's the best way to use multiple version of node AND npm?

Hi,

After installing a bunch of version of node, npm, modules using different 
ways, I managed to fuck up my installation… I've deleted of files related 
to node, npm and node modules to start my installation from scratch.

I'm using Mac OS X Lion and reinstalled the official package coming with 
npm bundled: http://nodejs.org/dist/v0.6.11/node-v0.6.11.pkg (instead of 
using homebrew's node version like before).

But I also need node 0.4.x for some project running on Heroku. 
Unfortunately the npm version bundled with node 0.6.11 doesn't work with 
node 0.4.x. And it seems that `n` and `nave` can manage node versions but 
not npm versions. How would you do that?

Thanks

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to