From 20f9856dec395883a0caa7a3bb573984a25a05be Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 21 Jan 2020 17:33:42 -0500 Subject: [PATCH] notes on node versions --- nodejs/nodejs.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nodejs/nodejs.md b/nodejs/nodejs.md index c63cffe..6b4ab7c 100644 --- a/nodejs/nodejs.md +++ b/nodejs/nodejs.md @@ -1,3 +1,8 @@ +version management +=================================================================================================================================== + +## nvm + can use nvm to manage nodejs versions. not really sure how this works, but it is per user and operates off bash scripts and variables ¯\_(ツ)_/¯ @@ -5,4 +10,19 @@ going to have to pull from github. It will curl to clone the repo and then add s `exec bash` after install to refresh nvm install --lts -nvm use version \ No newline at end of file +nvm use version + +## npm n helper + +npm can be used to manage node itself through n +https://github.com/tj/n + +sudo npm cache clean -f + + +1. setup & *own* directyory with versions + * `sudo mkdir -p /usr/local/n` + * `sudo chown -R $(whoami) /usr/local/n` +2. own the instalation folders + * `sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share` +3. install n: `sudo npm install -g n`