module.exports.repl.ignoreUndefined = true;
With hint of familiar loneliness and nerdiness, but curiously unfathomable. This is, not your cup of Chai...
Friday, March 21, 2014
Saturday, March 15, 2014
Install npm and node locally without sudo or root privilege
Updated 7/21
Trying to play with node and meteor in my own directory with invoking root privilege
By default all these packages will assume default of /usr/local. We need to change that
In .bash_profile, add:
Make sure the changes are in effect by running:
For npm
Reference: https://www.npmjs.org/doc/files/npm-folders.html
Trying to play with node and meteor in my own directory with invoking root privilege
By default all these packages will assume default of /usr/local. We need to change that
In .bash_profile, add:
export npm_config_prefix=$HOME/local # For npm
export PREFIX=$HOME/local
export N_PREFIX=$HOME/local # For n
Make sure the changes are in effect by running:
. ~/.bash_profile
For npm
- Download the install script from https://npmjs.org/install.sh. At the time of writing, this URL issues a 301 redirect, so we need the '-L' switch to follow the redirection. To specify the prefix, we need 'npm_config_prefix' (covered in .bash_profile)
curl -L https://npmjs.org/install.sh | /bin/sh
- Node is installed via npm and the prefix is specified by N_PREFIX (covered in .bash_profile)
- Install the versions
npm install -g n
n stable
npm install -g
means the package will be installed relative to the current locationReference: https://www.npmjs.org/doc/files/npm-folders.html
Subscribe to:
Posts (Atom)