From 65ad9460567b0fb074634460856cd917120d77de Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 3 Nov 2017 15:11:57 -0600 Subject: [PATCH] document install location env variable --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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)