document install location env variable

This commit is contained in:
AJ ONeal 2017-11-03 15:11:57 -06:00
parent b0b829fd91
commit 65ad946056
1 changed files with 16 additions and 0 deletions

View File

@ -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 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 ## Notes
* [OS X](#apple-os-x) * [OS X](#apple-os-x)