diff --git a/README.md b/README.md index a2a6563..5e7ce33 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,22 @@ echo "Current node.js version is $(curl -fsSL https://nodejs.org/dist/index.tab echo "v8.9.0" > /tmp/NODEJS_VER ``` +## Choosing an install location + +Just set BOTH `NODE_PATH` and `NPM_CONFIG_PREFIX`. +The install path will be the preceding `lib/node_modules` +(which you usually want to be the same as `NPM_CONFIG_PREFIIX` anyway). + +```bash +export NPM_CONFIG_PREFIX=/tmp/user/local +export NODE_PATH=/tmp/user/local/lib/node_modules + +curl -fsSL bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps + +# If you want to add the install location to your PATH +PATH=$PATH:/tmp/user/local/bin +``` + ## Notes * [OS X](#apple-os-x)