Nvm: NVM not working under Restricted network

Created on 21 Jan 2016  路  9Comments  路  Source: nvm-sh/nvm

NVM not working under Restricted network. How to set proxy for NVM?

$nvm ls-remote 
NA
installing node non-issue / invalid

Most helpful comment

ALL_PROXY=http://proxyUrl:port nvm ls-remote

fixed it for me

All 9 comments

What do you mean "restricted network"?

Indeed if you can't connect to nodejs.org and iojs.org then you're going to have trouble. You can set the NVM_NODEJS_ORG_MIRROR and NVM_IOJS_ORG_MIRROR environment variables if you like, to point to mirrors or proxies that you are able to access.

These are documented near the bottom of the usage section in the readme.

I got it working by adding proxy

@byteshiva hello Siva, could you please kindly share what's need to be done in order to have it to work? I'm having the same issue (behind company proxy, nvm does not work). Thank you.

This is what is required

export http_proxy=username:[email protected]:port
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist

@byteshiva thank you so much Siva, turns out a https_proxy environment variable is required as well.

export https_proxy=username:[email protected]:port

It's all good now :)

Not enough. Local company bad ssl certs. How do I get nvm to do equivalent of (in .nmprc)
strict-ssl=false

nvm uses curl and ignores curlrc; you can鈥檛 get it to bypass SSL. You can use env variables to point to the http version of the mirrors (see the readme) but the better solution is to get your company to fix their network.

ALL_PROXY=http://proxyUrl:port nvm ls-remote

fixed it for me

This worked like a charm. Thanks @Cradanimal

Was this page helpful?
0 / 5 - 0 ratings