I'm trying to install Node with nvm, but when I type any version it's not available. When I type nvm ls-remote
I just just get "N/A".
I'm able to access the Internet, so I can't figure what could be going on.
Edit: Found easier fix: you can export the non https version of the mirror it uses to grab the stuff:
export NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist
Then nvm works
Pre edit:
Had the same problem just now.
Looks like by default it tries to use curl if it's available on your system.
I assume you're on linux also, so try running curl $NVM_NODEJS_ORG_MIRROR
and see if you get the same error I did:
curl: (77) error setting certificate verify locations:
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
Maybe some cert is expired or otherwise misconfigured (or someone's doing something nasty), until it's fixed, if you don't mind going around the security issue, you can find the nvm.sh file (should be at ~/.nvm/nvm.sh if you followed the install info), and you can add a -k
on line 17 after the curl, so it looks like this:
-- nvm.sh --
nvm_download() {
16 if nvm_has "curl"; then
17 curl -k $*
18 elif nvm_has "wget"; then
19 # Emulate curl with wget
...
}
Don't forget to restart your shell, then try nvm ls-remote
. Assuming the fix worked, you should be able to use nvm now.