If you have trouble using npm behind a proxy server, remember to set the npm proxy and https-proxy variables.
For example:
# sudo npm config set proxy http://10.0.2.2:3128 # sudo npm config set https-proxy http://10.0.2.2:3128
Things I know I'll forget sooner or later…
If you have trouble using npm behind a proxy server, remember to set the npm proxy and https-proxy variables.
For example:
# sudo npm config set proxy http://10.0.2.2:3128 # sudo npm config set https-proxy http://10.0.2.2:3128
Node.js binaries are available at nodejs.org. You can download the more stable LTS version or Current version with the latest features.
You can either first extract the binary files to a temporary directory, then copy them to the /usr/local directory; or extract the files right into the /usr/local directory.
/usr/local folder.
# cd temp # tar -xvJf ~/downloads/node-v7.2.0-linux-x64.tar.xz # cd node-v7.2.0-linux-x64 # sudo cp -R . /usr/local
/usr/local folder. First change directory to /usr/local, and then issue the tar command.
# sudo tar --strip-components=1 -xvJf ~/downloads/node-v7.2.0-linux-x64.tar.xz
# node -v v7.2.0
# npm version
{ npm: '3.10.9',
ares: '1.10.1-DEV',
cldr: '30.0.2',
http_parser: '2.7.0',
icu: '58.1',
modules: '51',
node: '7.2.0',
openssl: '1.0.2j',
tz: '2016g',
unicode: '9.0',
uv: '1.10.1',
v8: '5.4.500.43'
zlib: '1.2.8' }