Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use nvm behind the corporate firewall

Tags:

node.js

proxy

nvm

Since I am behind the corporate firewall, unable to install Node JS via nvm. I decided to use fiddler for proxying and then try to configure proxy in nvm as follows

nvm proxy http://127.0.0.1:8888 where 8888 is the proxy port in fiddler

However running nvm proxy still returns "none" and still get the timeout when I try to install latest node.

There is a related article: Unable to install node using nvm on windows

Any help is appreciated.

like image 726
jprism Avatar asked Dec 22 '25 15:12

jprism


2 Answers

Solution for Windows:

Make sure you run the nvm proxy command in Windows PowerShell/Command Prompt as Administrator (right click Windows PowerShell -> Run as administrator). Else the proxy won't be set!

nvm proxy http://127.0.0.1:8888   -> to set
nvm proxy                         -> to see current proxy
nvm proxy none                    -> to clear proxy

More info: https://github.com/coreybutler/nvm-windows

Solution for Linux:

1.Edit this file

nano ~/.curlrc

2.Add this line to the file

proxy = user:psw@host:port
like image 101
Bobz Avatar answered Dec 24 '25 10:12

Bobz


On windows I did like this:

found the file:C:\Users...seu usuario ...\AppData\Roaming\nvm\settings.txt

and added the following line: proxy: user:psw@host:port

like image 40
André Rodrigues de Sousa Avatar answered Dec 24 '25 10:12

André Rodrigues de Sousa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!