NodeJs

6 Notes
+ install Error: rollbackFailedOptional (Sept. 12, 2019, 3:19 p.m.)

npm config rm proxy npm config rm https-proxy npm config set registry http://registry.npmjs.org/

+ Enable NPM cache (Sept. 28, 2018, 10:31 p.m.)

npm config set cache-min 9999999

+ Error - Too many open files in system (July 17, 2018, 12:35 p.m.)

Add "ulimit -n 4096" to ~/.profile Then: source ~/.bashrc

+ Uninstalling npm (July 15, 2018, 9:43 a.m.)

npm uninstall npm -g

+ npm behind socks5 proxy (June 19, 2018, 5:42 p.m.)

1- Install polipo: apt install polipo or manually find the latest version and download using wget: http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/ http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/polipo_1.1.1-8_amd64.deb 2- Update the config file: https://github.com/jech/polipo/blob/master/config.sample http://navigator.servision.com.cn:8402/polipo/config vim /etc/polipo/config socksParentProxy = "127.0.0.1:1337" # proxyAddress = "::0" # both IPv4 and IPv6. If IPV6 is disabled in your environment, do not use this. proxyAddress = "0.0.0.0" # IPv4 only socksProxyType = socks5 proxyAddress = "::0" proxyPort = 8123 3- sudo service polipo restart Check the logs: tail -f /var/log/polipo/polipo.log 4- Establish a proxy tunnel: ssh -D 1337 -fN root@ca.mohsenhassani.com 5- Set these NPM configurations in the terminal: npm config set proxy http://127.0.0.1:8123 npm config set https-proxy http://127.0.0.1:8123 ------------------------------------------------------------------- Clear https proxy: npm config rm proxy npm config rm https-proxy -------------------------------------------------------------------

+ Installation (April 10, 2016, 6:57 a.m.)

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions --------------------------------------------------------------------------------------------- 1- apt install curl build-essential 2- curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - 3- apt install -y nodejs Update Node Package Manager (NPM): sudo npm i npm@latest -g --------------------------------------------------------------------------------------------- For Mac OS use this command: brew install node