Created
September 11, 2010 05:36
-
-
Save guybrush/574872 to your computer and use it in GitHub Desktop.
install multiple nodejs versions, use same npm packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# node ---------------> ~/.nvm/<node-version>/bin/node | |
# node-libraries -----> ~/.node_libraries | |
# node-binaries ------> ~/.node_binaries | |
# | |
aptitude install g++ curl libssl-dev apache2-utils make | |
git clone git://github.com/creationix/nvm.git ~/.nvm | |
vi ~/.bashrc | |
export PATH=$PATH:~/.node_binaries | |
NVM_DIR=$HOME/.nvm | |
. $NVM_DIR/nvm.sh | |
nvm use | |
nvm install v0.2.5 | |
nvm use v0.2.5 | |
mkdir ~/.node_libraries | |
mkdir ~/.node_binaries | |
git clone http://github.com/isaacs/npm.git tmpnpm | |
tmpnpm/cli.js install npm \ | |
--root ~/.node_libraries \ | |
--binroot ~/.node_binaries | |
rm -rf tmpnpm | |
npm config set root ~/.node_libraries | |
npm config set binroot ~/.node_binaries | |
nvm help | |
npm help | |
npm install connect spark express jade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment